Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

8/3/2020 Visual Programing

Final Report
Contents
Introduction:..............................................................................................................................................2
Problem Statement/ Objective:.................................................................................................................2
Software Requirements:............................................................................................................................2
Purpose...................................................................................................................................................2
List of use cases:....................................................................................................................................2
Use-case Model......................................................................................................................................2
Use Case Diagram:................................................................................................................................2
Sequence Diagram:................................................................................................................................3
Software design:........................................................................................................................................5
Software Implementation:........................................................................................................................6
Programming Language/Tool Selection...............................................................................................6
C#:..........................................................................................................................................................6
Software Used:.......................................................................................................................................6
Visual Studio:.....................................................................................................................................6
Microsoft Word.................................................................................................................................6
Software Testing:.......................................................................................................................................6
Test items...............................................................................................................................................7
Test cases................................................................................................................................................7
Conclusion:..............................................................................................................................................12
References:...............................................................................................................................................13
Introduction:
Snake game is very popular in world wide every one like to play this game because it is very easy and
simple. Snake game is a computer action game and its goal are to control the move of snake and collect
food. In this document I develop a snake game. In this game snake have to collect the food. Aster
collecting each food score is added. Player can control the snake using the keys (up, down, left, right).
Experimental results show that our design method able to generate smart controllers.

Problem Statement/ Objective:


I implemented this game in C# language. It is a simple window foam base application. In this
project you can play this popular “Snake Game” just like you played elsewhere. You have to use
key like up, down, left, right arrows to move the snake.
Foods are provided in different places on the screen for the sake to eat. Every time snake eat
food its length increases and points are added on Score board.
Our aim is to make game smoother, improve its quality and make it more enjoyable. So, that
while playing this game user can enjoy it and forgot all their stress. And clam and fresh.

Software Requirements:
Let’s take a look on the requirements that are needed to introduce the software of Calligraphy
Recognition System.
Purpose
The purpose of this Requirement Specification document is to clear the requirements of
the system and to decide what the game should do and what the game should not do.
List of use cases:
There are 3 cases that are used in our developed application which are as follows:
1. User launches the game
2. Play game
3. Display Scoreboard
4. User hits an obstacle
Use-case Model
Use-case model contains use-case diagram and details of use-cases. Use-case diagram is a
graphical representation of user’s interaction with the system. Use-case diagram can portray the
different types of users of a system and ways that they interact with system. Use cases list is
mentioned in use case diagram.
Use Case Diagram:

User Launch the


Game screen
game
displayed

Play Snake game User start


playing

User Display
Score is
Scoreboard
displayed

User hits an
obstacle Game over is
displayed with
try again option

Use-case diagram
Sequence Diagram:

Player Game

Press direction key

Start running the snake

Presses direction key

Moves snake in desired direction

Hits dot

Increases length of snake

Hits own body

Freezes game/game over


Software design:
Software Implementation:
After the completion of detailed design phase, the next phase is implementation phase.
The main purpose of the implementation phase is to convert the selected design of system
in to executable form or code the system. In this phase we also take other selection
decisions such as framework selection, language selection, tool selection etc. This chapter
will explain all steps that are necessary for the system development.
Programming Language/Tool Selection
The important step is in implementation is to decide which programming language or tool
is suitable for development of a system.
C#:
We implemented Snake game in C#. C# (pronounced as C-sharp) is a modern, multi-
paradigm programming language that enables the developers or programmers to build
variety of secure and robust applications that runs on the .NET framework. We design
Snake game on window base application.
Software Used:
Visual Studio:
Visual Studio Integrated Development Environment is a launch platform that you can use to edit,
debug, and code, and publish the app. Integrated Development Environment (IDE) is a program
that contains a feature that can be used in many software developments tools. In addition to
standard editing and debugger provided by many IDEs, Visual Studio includes compilers, coding
tools, image designers, and many other features to streamline the software development process.
Microsoft Word
We have used Microsoft word 2016 for the documentation.
Software Testing:
After the completion of implementation phase then it comes the very important phase
of software development which is ‘software testing’ phase. The main aim of the
software testing is executing the software with the intent of finding errors in the
system and determining that whether the software is fulfilling all requirements or not.
Software testing contains User Acceptance Tests (UAT) designed according to each
case mentioned in the analysis phase. The UAT tests are very helpful in analyzing all
requirements that are finalized in the analysis phase have been met or not.
Test items
This section of the test plan lists all the items of the Snake Game project that will be
tested:
• Game Execution
• left function
• Right function
• Up function
• Down function
• Game over
• Restart

Test cases
The following are the test cases for the Snake Game. As black is the head of snake:
TEST CASE 1 – Game Execution
• Incorrect Input: User cannot run code properly or there must be an error.
• Pass Criteria: the system shows an appropriate message that there must be an error in your
code.
• Correct Input: The correct input would be that code run properly and there is no error in code.
• Pass Criteria: The pass criteria is game executed and display the game screen.
TEST CASE 2 – Left Function
• Incorrect Input: incorrect input is that user may not press valid key like left arrow key.
• Pass Criteria: The Snake didn’t change their direction and after touch to boundary game
overs.
• Correct Input: the user presses valid key like left arrow key.
• Pass Criteria: The Snake change their direction to Left.

TEST CASE 3 – Right Function


• Incorrect Input: incorrect input is that user may not press valid key like right arrow key.
• Pass Criteria: The Snake didn’t change their direction and after touch to boundary game
overs.
• Correct Input: the user presses valid key like right arrow key.
• Pass Criteria: The Snake change their direction to Right.
TEST CASE 4 – Up Function
• Incorrect Input: incorrect input is that user may not press valid key like up arrow key.
• Pass Criteria: The Snake didn’t change their direction and after touch to boundary game
overs.
• Correct Input: the user presses valid key like up arrow key.
• Pass Criteria: The Snake change their direction to Up.
TEST CASE 5 – Up Function
• Incorrect Input: incorrect input is that user may not press valid key like Down arrow key.
• Pass Criteria: The Snake didn’t change their direction and after touch to boundary game
overs.
• Correct Input: the user presses valid key like down arrow key.
• Pass Criteria: The Snake change their direction to Down.

TEST CASE 6 – Game Over


• Incorrect Input: the incorrect input in this case is there must be an error in code.
• Pass Criteria: The Game may not be over and snake move outside the boundary and we didn’t
see it.
• Correct Input: the correct input is that Snake touch the boundary.
• Pass Criteria: The
Game over screen is
shown.
TEST CASE 6 – Restart
• Incorrect Input: the incorrect input is that user press any other key expect Enter key.
• Pass Criteria: The Game is not restarting again.
• Correct Input: The user press Enter key.
• Pass Criteria: The Game start from the beginning.
Conclusion:
This project gives us more thrilling, frustrating and also gives us more pleasure. It helps us in
many sectors like planning, developing programming skill, designing, managing, socket
programming and so on.
The purpose of object-oriented programming is to have code that is structured and organized. For
the most part, you’ll find yourself in situations where you’ll be reusing code. Instead of having to
recreate that same logic for each project, you can have a class that does most of the work for you.
Another reason for having such strict concepts is because you may end up sharing your class.
References:
https://www.researchgate.net/publication/309390260_Snake_game_AI_Movement_rating_functions_a

nd_evolutionary_algorithm-based_optimization

https://www.researchgate.net/publication/312616413_Finding_Comfortable_Settings_of_Snake_Game

_Using_Game_Refinement_Measurement

https://creately.com/diagram/example/iyrdm4gj2/snake%20game

https://creately.com/diagram/example/ig93s3du/Snake%20Game%20%20Use%20Case%20Diagram

You might also like