Skip to content

pranavishvar/cricket-human-computer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

cricket-human-computer

A simulation of hand cricket game. In this game a person can play with computer.

python version used 3.8.1

To run the program issue the following command

python cricket-h2c.py

(venv) C:\Users...>python cricket-h2c.py
odd or even game
(b)Bat or (s)Bowl: b
computer will bowl
your turn: 3 <== Enter a number between 1 to 6
player: 3
computer: 5
your turn: 4
player: 4
computer: 6
your turn: 3
player: 3
computer: 6
your turn: 2
player: 2
computer: 6
your turn: 3
player: 3
computer: 2
your turn: 4
player: 4
computer: 3
your turn: 3
player: 3
computer: 1
your turn: 2
player: 2
computer: 5
your turn: 3
player: 3
computer: 2
your turn: 4
player: 4
computer: 3
your turn: 3
player: 3
computer: 6
your turn: 2
player: 2
computer: 6
your turn: 3
player: 3
computer: 2
your turn: 4
player: 4
computer: 2
your turn: 4
player: 4
computer: 5
your turn: 3
player: 3
computer: 3 <== line number 59 and 60 value matches --> PLAYER OUT!!
"player out " <==
"player score 47" <==
your turn: 4 # Bating: Computer, Bowling: Human
player: 4
computer: 5
your turn: 3
player: 3
computer: 2
your turn: 4
player: 4
computer: 6
your turn: 3
player: 3
computer: 1
your turn: 2
player: 2
computer: 6
your turn: 3
player: 3
computer: 4
your turn: 4
player: 4
computer: 1
your turn: 3
player: 3
computer: 1
your turn: 2
player: 2
computer: 2 <== line number 88 and 89 value matches --> COMPUTER OUT!!
"computer out " <==
" computer score 26" <==
"Player won the match" <== WINNER PLAYER!!!

About

A cricket game. In this game a person can play with computer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages