Multi-player poker game
- Frontend: JavaScript (HTML, CSS) for UI development in the browser.
- Backend: Node.js with WebSockets for real-time multiplayer support.
- Database: Firebase or MongoDB for storing game sessions, player data, and game state.
- Deployment: DigitalOcean Droplet Server
- Version Control: GitHub for collaboration and version management.
- Create a command-line interface (CLI) to start a poker game.
- Allow a player to set game rules (blinds, buy-ins, initial balance).
- Implement a simple menu to choose actions (start game, set blinds, etc.).
- Implement card dealing for players (two private cards per player).
- Program the full poker hand sequence: pre-flop, flop, turn, river.
- Allow basic player actions (check, fold, call, raise) via CLI.
- Assign dealer, small blind, and big blind randomly for each round.
- Rotate dealer and blinds after each hand.
- Handle game phases and calculate the winner based on hand rankings.
- Track player balances and end the game when one player has all the money.
- Ensure the game runs smoothly and all phases work as intended.
- Test for edge cases like running out of money or invalid player actions.
- Develop a simple graphical user interface (GUI) for the game using JavaScript, HTML, and CSS.
- Create input fields for setting blinds, buy-ins, and player names.
- Display poker cards, player information (names, balances), and action buttons (fold, check, raise).
- Allow multiple players to play on the same machine.
- Use the UI to handle each player's turn (allow interaction with buttons).
- Display dealer, small blind, and big blind on the screen.
- Adapt the existing command-line game logic for the new UI.
- Implement visual updates for the game phases (dealing cards, bets, community cards).
- Automatically rotate blinds and dealer visually on the screen.
- Improve the player experience with card animations, betting visuals, and pot updates.
- Display the current pot and actions for all players in real-time.
- Test for smooth transitions between player turns.
- Ensure game phases and betting logic remain accurate in the new UI environment.
- Set up a backend server using Node.js and WebSockets for real-time communication.
- Handle session creation for multiplayer games: store game ID, player list, and game state.
- Allow the host to create a new game session with a unique game ID.
- Let players join a game using the game ID.
- Ensure the server manages the dealer, blinds, and turns across all connected clients.
- Sync game state across multiple clients using WebSockets or Firebase.
- Handle player actions (check, fold, raise, etc.) and update all players in real-time.
- Extend the existing UI to support real-time updates for multiple players.
- Display each player's action in real-time (e.g., "Player 1 folds").
- Sync dealer, small blind, and big blind assignments across all clients.
- Allow up to 4 players per game session.
- Handle player disconnections and reconnections.
- End the game when one player has all the money or everyone leaves.
- Add basic security checks for game inputs and actions.
- Ensure fair play by randomizing card dealing server-side.
- Test multiplayer interactions across multiple devices.
- Debug real-time synchronization issues and edge cases like player disconnections.
- Package the app and deploy the server for real-time play on DigitalOcean.
- Ensure scalability and smooth performance for multiple concurrent sessions.