shekark642 / roopies-p2

P2 Slackbots Tri 2 Project
0 stars 1 forks source link

Justin MVC: Model Design #31

Open jli615 opened 2 years ago

jli615 commented 2 years ago

The Coin Game will be a 1 or 2 player game that invokes the Coin Game rules from our FRQ 4. If the user decides that they want it to be single player, then they will play against a computer which plays its moves based off of RNG. If they decide that they want to play in multiplayer mode, then two users can battle head to head, each making their own moves.

At the beginning of each round, the user inputs how many coins they want to bet on the current round - 1, 2, or 3. Coins are then awarded to each player according to the following rules.

Same rule: If both players spend the same number of coins, player 2 gains 1 coin.

Off-by-one rule: If the players do not spend the same number of coins and the positive difference between the number of coins spent by the two players is 1, player 2 is awarded 1 coin.

Off-by-two rule: If the players do not spend the same number of coins and the positive difference between the number of coins spent by the two players is 2, player 1 is awarded 2 coins.