Skip to content

Human vs Robot game, where the human selects whether they are odd or even and then reveal the number of fingers they are each holding. If the sum of fingers is odd then odd team wins and vice versa.

Notifications You must be signed in to change notification settings

Kartik-M24/Odd-and-Even-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odd and Even Game

This game was developed using Java. It uses OOP principles, exceptions and two design patterns, Factory and Strategy. In this game, a human plays against the CPU. The human selects the difficulty and whether they're odd or even and then decides the number of fingers to output. After each round, the winner is declared, and the overall results are shown when the game ends. For the difficulty, different strategies are set in place. Level Easy randomly picks the number of fingers (off a base seed). Medium uses the random strategy for 3 rounds before checking the human's track record for #odd and #even fingers shown to make an informed guess as to what they will pick this round. Hard switches between strategies after losing a round.

image

About

Human vs Robot game, where the human selects whether they are odd or even and then reveal the number of fingers they are each holding. If the sum of fingers is odd then odd team wins and vice versa.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages