Rajminiproject
Rajminiproject
Project Report
On
SULTEN SNAKE Game
Submitted in partial fulfillment of the requirement for the 4th semester
UNIVERSITY ROLL NO :-
2061902
Many thanks to Professor “Dr. Ankur Singh Bisht” (HOD-CS&E, GEHU), and
other faculties for their insightful comments, constructive suggestions, valuable advice,
and time in reviewing this thesis.
Finally, yet importantly, I would like to express my heartiest thanks to my
beloved parents for their moral support, affection and blessings. I would also like to
pay my sincere thanks to all my friends and well-wishers for their help and wishes for
the successful completion of this research.
Table Of Contents
Declaration .................................................................................................. I
Certificate. ................................................................................................... II
Acknowledgment ......................................................................................... III
Abstract ....................................................................................................... IV
Table of Contents .......................................................................................... VI
List of Publications ....................................................................................... X
List of Tables ................................................................................................ XII
List of Figures ................................................................................................XIII
List of Symbols ............................................................................................. XIV
List of Abbreviations ..................................................................................... XV
1. Introduction
• Prologue:
The player controls a dot, square, or object on a bordered plane.
As it moves forward, it leaves a trail behind, resembling a moving snake.
In some games, the end of the trail is in a fixed position,
so the snake continually
gets longer as it moves.
• Background and Motivations:
Snake is a video game genre where the player maneuvers a growing line that becomes a primary
obstacle to itself. The concept originated in the 1976 two-player arcade game Blockade from
Gremlin Industries, and the ease of implementation has led to hundreds of versions (some of
which have the word snake or worm in the title) for many platforms. 1982's Tron arcade game,
based on the film, includes snake gameplay for the single-player Light Cycles segment. After a
variant was preloaded on Nokia mobile phones in 1998, there was a resurgence of interest in snake
games as it found a larger audience.
• Problem Statement:
On making Game we face some logical errors. The distance between
each walls, width of each wall(#) and the gap width was not uniform . The game closed
without running properly. However, we overcame all these errors by little help of Code
Editor, Google and YouTube.
2. Proposed System
2.1 History:
The Snake design dates back to the arcade game Blockade,[2][3] developed and published by Gremlin in 1976.
[4] It was cloned as Bigfoot Bonkers the same year. In 1977, Atari, Inc. released two Blockade-inspired titles:
the arcade game Dominos and Atari VCS game Surround.[5] Surround was one of the nine Atari VCS launch
titles in the US and was sold by Sears under the name Chase. That same year, a similar game was launched for
the Bally Astrocade as Checkmate.[6]
n
The first known home computer version, titled Worm, was programmed in 1978 by Peter Trefonas for the
TRS-80,[2] and published by CLOAD magazine in the same year. This was followed shortly afterwards with
versions from the same author for the Commodore PET and Apple II. A clone of the Hustle arcade game, itself
a clone of Blockade, was written by Peter Trefonas in 1979 and published by CLOAD.[7] An authorized
version of Hustle was published by Milton Bradley for the TI-99/4A in 1980.[8] The single-player Snake Byte
was published in 1982 for Atari 8-bit computers, Apple II, and VIC-20; a snake eats apples to complete a
level, growing longer in the process. In Snake for the BBC Micro (1982), by Dave Bresnen, the snake is
controlled using the left and right arrow keys relative to the direction it is heading in. The snake increases in
speed as it gets longer, and there's only one life.
3. S/W AND H/W REQUIREMENTS (UP TO FULLEST EXTENT)
3.1 Software and Hardware Requirements:
Software Requirements:
Data Requirements:
The set of data that is involved in any project is defined using data requirements. For
this project, as such for this project minimum data is required
Functional Requirements
Functional requirements are properties that must exist in the final system. We must
Have eclipse or nay IED to create this game. However, it can run on any device doesn’t
having above applications
Performance Requirements
Response time, scalability, platform dependencies, tolerance are the performance
requirements that should be considered when developing any system. The
application or system should be able to respond quickly when the user interacts with
the application. The application should be developed in such a way that it should be
scalable enough to accept new features when we want to expand the application
complexity. The application should run in all the specified software and hardware
requirements from the design phase of the project.
System Requirements
The application should be installed into a device, system or any machine in such a
way that it should have basic requirements like supporting software and hardware of
the device, accessing in-built software, and potential security issues such as virus or
any malware detection.
Hardware Requirements:
This is a lightweight game and it doesn’t need powerful computers. It can be run in
computers having following specs.
• OS: Windows XP SP3 or above version of windows can run this game .
Approach
In order to make effective learning we needed to defined the state space of the
problem. We found that there are 4 elements that we want to include in the state
space:
1. Snake
2. Cell
3. Board
4. Game
The class Game represents the body of our program. It stores information about the snake and
the board.
The Cell class represents the one point of display/board. It contains the row no, column no and
the information about it i.e. it is empty or there is food on it or is it a part of snake body?
SSOURCE CODE
#include<windows.h>
// To represent a cell of display board.
public class Cell {