Skip to content

This project was given to me in during Intershala C and C++ training. In this I build a cricket game application using the C++ programming language.

Notifications You must be signed in to change notification settings

vivek1833/CPP-Cricket-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CPP-Cricket-Game 🏏

This project was given to me in during Intershala C and C++ training. In this I build a cricket game application using the C++ programming language.

▶Implementation✨

1. There should be two teams: TeamA and TeamB

  • Each team will have 4 players.
  • The players for each team will be selected by the user from the given pool of 11 players. You can assign the names to those 11 players yourself.
  • The sequence in which the players are selected for each team will decide the batting and bowling sequence for that team. For example, if Team A has Virat, Rohit, Dhawan, and Rahul; Virat will be the first player to bat or ball.

2. There should be two innings

  • Each innings will be of 6 balls.
  • In each innings, only one bowler from the bowling team will bowl all the 6 deliveries and at a time one batsman from the batting team will bat until he is declared out.
  • The first player from the bowling team will be always selected to bowl first and the first player from the batting team will be always selected to bat first.
  • When a batsman is OUT, the next batsman from the batting team in sequence will start batting.

3. There should be a toss functionality📀

  • The team who wins the toss will decide to either bat or bowl first

4. In each delivery, possible runs can be scored from 0 to 6

5. OUT criteria: 💢

  • If a batsman scores 0 runs he will be declared OUT and the next batsman in sequence will start batting

6. Match End criteria 🚫

  • If runs scored by TeamA is greater than the opponent TeamB, then TeamA will win the game or vice-versa.
  • If runs scored by TeamA and TeamB are the same then the match will draw.

About

This project was given to me in during Intershala C and C++ training. In this I build a cricket game application using the C++ programming language.

Topics

Resources

Stars

Watchers

Forks

Languages