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

Virtual Cricket Game

Made by – Jai Prakash Arora


ECE-A
02120802818
INTRODUCTION

 The project cricket game is an easy to use, fun game which the user can play easily.
 Here the user gets to make his own team.
 It is a short cricket game where the user by just pressing the enter key plays the match.
 The computer in return automatically generates numbers which are put up in scorecard.
 To win a tournament, the user must try and get the maximum points. The participants with
the most points or the highest score gets rank one amongst other participants and
eventually is declared the winner. Here's how a Fantasy Cricket game may look like.
How to play ?

 The user gets to create a team of 4 players each by selecting from a oll of 11 players.
 Each team scores runs according to their players have made.
 Every innings will be of not more than 6 balls.
 The team with a higher score will win the game.
 That’s how a virtual cricket game will look like.
How’s it made ?

 In total 7 files have been created.


 3 header file are created named under game.h, player.h, team.h
 4 source files are created named under virtual-cricket-game.cpp, player.cpp, game.cpp,
team.cpp
Software Required

 Eclipse is integrated development environment  (IDE) used in computer programming. It


contains a base workshop and an extensible plug-in system for customizing the
environment.
 CPP programming language
 Java jdk and mingw setup was used.
Introduction Screen

 When the game starts a welcome screen is displayed.


 Here the welcome screen is displayed with the help of “cout” and “endl” instructions.
 Eg: cout << “Welcome” << endl;
 After pressing enter key the user
moves on to the next part of the
game.
Pool of players

 The user gets to see a pool of 11 players to choose its team from.
 The players have been pointed out by their index number.
 Eg: players[0] = "Virat";
 After pressing the enter key the
user moves on to the next part of
choosing its own team.
Creating Teams

 By putting in the index values associated with the players, the user gets to choose its own
team.
 Not more than 2 teams will be created per match.
 The user can choose up to a maximum
of 4 players per team.
 If the user enters a number other than
an integer, an error message is displayed.
Team display

 That’s how the team will be created after the user is done choosing the players.
 After pressing the enter key the user moves on to the toss part.
Toss

 Rand function is used to do the toss.


 Switch case is used to decide which team will win the toss.
 Eg: int randomValue = rand() % 2; // 0 or 1
Innings

 If runs scored by the batsman is 0, then the batsman is declared out.


 If the batsman scores 0 runs and is declared out, the baller gets the wicket.
 Else all the runs scored by the batsman are added in the scorecard.
That’s how the innings will proceed
Conclusion

 It is a fun, entertaining game.


 It can be played at any time and is a user friendly game.
 Although there is scope for further modifications in this project, but this was a successful
trial to create a virtual cricket game.
THANK YOU

You might also like