Rat in A Maze: A Mini Project Report On
Rat in A Maze: A Mini Project Report On
on
Rat in a Maze
By
P.HONEY - 1602-14-733-075
Y.BHAVANI-1602-14-733-067
ACKNOWLEDGEMENT
We are grateful to our beloved principal Mr. K. Jaya Sankar,M.Tech,Ph.D , for his immense
support in our project work for providing necessary resources in campus. we grateful to
Dr.T.Adilakshmi, M.Tech,Ph.D Head of the Computer Engineering Department us to work
on this project and allowing us use laboratory facilities in the department .We are highly
thankful to other staff members for their valuable guidance and suggestions during our project
work. We wish to express our sincere gratitude to our guide Mr.M.S.V.Sashi Kumar, M. tech,
Department of Computer Engineering for his stimulating guidance during the period of
this project work . we also thank him for his timely guidance and also for the encouragement
showed on us , for the punctual completion of this project. Finally we like to express our
sincere thanks to teaching and non-teaching staff who extended their help when ever needed.
Table of Contents
1 INTRODUCTION:...............................................................................................1
1.1 Purpose:..........................................................................................................1
1.2
Scope:..........................................................................................................1
1.3
1.4 Overview:.....................................................................................................2
2.0
OVERALL DESCRIPTION...........................................................................2
User Characteristics...................................................................................... 3
ABSTRACT
The rat in a maze game is designed to provide some kind of entertainment to the user by its look
and by playing this game ,user can increase his thinking capacity. It will allow users to enter their
name and compare his score with all other users in the database.It will also give extra benefits
who got more score. The rat in a maze game is designed to provide some kind of entertainment
to the user by its look and by playing this game ,user can increase his thinking capacity.
HARDWARE REQIREMENTS:
RAM:- 4 GB
Internal memory:-500 GB
Processor:- Intel i3
SOFTWARE REQUIREMENTS:
1.Introduction
1.1 Purpose
The Rat in a Maze is a python application in which rat will move according to the users
input such that rat should find the path from starting block to cheese block in any number of
moves. The maze consists of a large platform with a series of vertical walls and a transparent
ceiling.In t these mazes some are blocked,means rat cannot enter into those cells.
1.2 Scope
The purpose of this specification is to document requirements for a system to manage the Rat in
a Maze python application. The specification identifies what such a system is required to do. In
this game,the user will move the rat in order to reach cheese block by using arrow buttons. In this
,users are provided with daily,weekly challenges whoever wins will be displayed to all other
users as winner.The user can move the rat in any directions(right,left,forward,backward).
1.3 Definitions, Acronyms, and Abbreviations
RIM Rat In Maze
GUI Graphical User Interface
1.4 References
1. S.R.Bharamagoudar1, Geeta R.B.2,
S.G.Totad3 Assistant Professor, Dept. of
Electronics & Communication Engg, Basaveshwar Engg. College, Bagalkot, Karnataka.
1.5 Overview
This specification includes a brief product perspective and a summary of the functions the
software will provide. User characteristics are discussed and any general constraints or
assumptions and dependencies are listed. Requirement statements are categorized as
functional requirements, performance requirements, non-functional requirements, or design
constraints. Functional requirements are further categorized in terms of admin management,
user management. Nonfunctional requirements are further categorized in terms of security,
maintainability, and scalability.
1
2. General Description
2.1 Product Perspective
The rat in a maze game is designed to provide some kind of entertainment to the user by its look
and by playing this game ,user can increase his thinking capacity.
It will allow users to enter their name and compare his score with all other users in the
database.It will also give extra benefits who got more score.
The following constraints will limit the developer's options for designing the system:
3. Specific Requirements
3.1Functional Requirements
R l. user credentials
R1.1 The user is allowed to enter his personal details like name,phone number.
R1.1.1 The details of user are not necessary.He may provide his details or may not.
R1.2 The users who are participated in this game will be displayed in rank board for every
attempt.
R1.3 The users can see other users score in this game.
R1.4 The users can be provided with gifts when they will be the top ranker.
R1.5
4 Source Code:
#! /usr/bin/env python
import os
import random
import pygame
# Move each axis separately. Note that this checks for collisions both times.
if dx != 0:
self.move_single_axis(dx, 0)
if dy != 0:
self.move_single_axis(0, dy)
if self.rect.colliderect(wall.rect):
if dx > 0: # Moving right; Hit the left side of the wall
self.rect.right = wall.rect.left
if dx < 0: # Moving left; Hit the right side of the wall
self.rect.left = wall.rect.right
if dy > 0: # Moving down; Hit the top side of the wall
self.rect.bottom = wall.rect.top
if dy < 0: # Moving up; Hit the bottom side of the wall
self.rect.top = wall.rect.bottom
# Initialise pygame
os.environ["SDL_VIDEO_CENTERED"] = "1"
pygame.init()
4
clock = pygame.time.Clock()
W W",
"W
WWWWWW WW W",
"W WWWW
"W W
W W WWW",
WWWW
W",
W",
"W W
WW
WW W",
"W W
W WWWWWW W",
W W W W W W",
WW W",
WW WWWWWW W",
WWW W W",
WW W W W",
E W",
"WWWWWWWWWWWWWWWWWWWWWWWW",
]
5
# Parse the level string above. W = wall, E = exit
x=y=0
running = True
while running:
clock.tick(60)
for e in pygame.event.get():
if e.type == pygame.QUIT:
running = False
if e.type == pygame.KEYDOWN and e.key == pygame.K_ESCAPE:
running = False
if key[pygame.K_DOWN]:
player.move(0, 2)
5 Screen Shots:
6 Conclusion:
The Game is Created for the fun and entertainment.
7 Future Enhancements:
Further enhancements for the project would be able to add new levels.
7. References:
1. http://www.pygame.org/docs/ref/image.html
2. http://www.pygame.org/hifi.html
3. http://www.pygame.org/docs/ref/mixer.html
4. http://www.pygame.org/docs/