Computer Science Project On Snake and Ladder Game
Computer Science Project On Snake and Ladder Game
N0-2
RAIPUR
COMPUTER SCIENCE
PROJECT
TOPIC : SNAKE AND LADDER
GAME
TABLE OF CONTENTS
Certificate
Acknowledgement
Requirements
Coding
Output
Bibliography
Certificate
This is certify that ISHAN GUPTA of
class XII Science (A), has successfully
completed their project on computer
practicals for the AISSCE (All India
Senior School Certificate Examination)
as prescribed by CBSE in the year
2015-16.
Examiners Signature:
Signature of Subject
of Principal
Date:
Signature
Teacher
____________________
_____________________
Acknowledgement
We thank our Computer Science teacher
Mrs. TARA YADAV for guidance and support.
We also thank our Principal T RUKMANI . We
would like to thank all of our friends and
teachers for encouraging us during the
course of this project. Finally we would like
to thank CBSE for giving us this opportunity
to undertake this project.
CODING
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<time.h>
void main()
{
int player1=0,player2=0,lastposition;
char player1name[80],player2name[80];
clrscr();
randomize();
draw_line(50,'=');
cout<<"\n\n\n\n\t\tSNAKE LADDER GAME\n\n\n\n";
draw_line(50,'=');
cout<<"\n\n\nEnter Name of player 1 :";
gets(player1name);
cout<<"\n\n\Enter Name of player 2 :";
gets(player2name);
while(player1<=100 && player2<=100)
{
board();
gamescore(player1name,player2name,player1,player2);
cout<<"\n\n--->" <<player1name<<" Now your Turn >>
Press any key to play ";
getch();
lastposition=player1;
play_dice(player1);
if(player1<lastposition)
cout<<"\n\aOops!! Snake found !! You are at postion
"<<player1<<"\n";
else if(player1>lastposition+6)
else
cout<<player2name<<" !! You are the winner of the
game\n\n";
draw_line(50,'+');
getch();
}
void board()
{
clrscr();
cout<<"\n\n";
draw_line(50,'-');
cout<<"\n\t\tSNAKE AT POSITION\n";
draw_line(50,'-');
cout<<"\n\tFrom 98 to 28 \n\tFrom 95 to 24\n\tFrom 92 to
51\n\tFrom 83 to 19\n\tFrom 73 to 1\n\tFrom 69 to 33\n\tFrom
64 to 36\n\tFrom 59 to 17\n\tFrom 55 to 7\n\tFrom 52 to
11\n\tFrom 48 to 9\n\tFrom 46 to 5\n\tFrom 44 to 22\n\n";
draw_line(50,'-');
case 66 :score=87;break;
case 80 :score=100;
}
}
OUTPUT
Requirements
HARDWARE REQUIRED
Printer, to print the required
documents of the project
Compact Drive
Processor : Pentium III
Ram : 64 MB
Hard disk : 20 Gb.
SOFTWARE REQUIRED
Operating system : Windows XP
Turbo C++, for execution of
program and
Ms word, for presentation of output.
www.cbseportal.com
www.cbseportal.com
BIBLIOGRAPHY
COMPUTER SCIENCE IN C++ BY: SUMITA ARORA
COMPUTER SCIENCE TEACHER: - Mrs. Tara Yadav
(P.G.T Computer
Science)
seportal.com
www.cbseportal.com
www.cbseportal.com
SCOPE OF FUTURE
ENHANCEMENT
The game can be recreated with the
graphics to make it look attractive. There is
also a scope that game may have different
levels. The game can also be created in