This is a simple jackpot-style game implemented in JavaScript. Players can bet money on a color-matching game for a chance to win.
The game involves three colored cards. Players place a bet, and three colors are randomly drawn. The player wins if all three colors match or if all three colors are different.
- Random color generation for each game
- Betting system with wallet management
- Statistics tracking (games played, wins, losses)
- Simple UI with color display and results
- Enter your bet amount
- Click the "Play" button
- Three colors will be randomly selected
- You win if all colors match or if all colors are different
- Winning bets pay out 3x the bet amount
The game is implemented using several JavaScript classes:
Draw
: Handles the random color selectionGame
: Main game logic and UI managementResult
: Determines game outcomes and winningsStatistics
: Tracks game resultsWallet
: Manages the player's money