frostjohn / coin_bet_game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coin Bet Game

Coin Toss Game where players bet for each toss Players can only bet once in a Game Players get rewards (if they win) Players get rewards based on their bet amount (if they win) They lose their bet (if they lose)


Bet

  • String BetID
  • String PlayerID
  • String GameID
  • Enum PlayerBet (Heads/Tails)
  • Decimal BetAmount

Game class

  • String GameID
  • Winning Bet Heads/Tails

How would you calculate the following:

  • Q: Returns the reward for a unique player in a game, based on their BetAmount

About


Languages

Language:JavaScript 100.0%