A real-time multiplayer card math game where two players race to combine 4 poker cards using arithmetic operations to hit a target number.
- Real-time multiplayer — Two players compete head-to-head via WebSocket
- Configurable target — Default is 24, but any number 1–999 works
- Guaranteed solvable — Every deal is verified to have at least one solution
- Poker card visuals — Beautiful CSS-rendered cards with suits and values
- Valentine's theme — Pink/red/gold palette, floating hearts, love-themed messages
- Expression builder — Click cards and operators to build your answer
- Round timer — Optional countdown per round
- Score tracking — Best of N rounds with final scoreboard
- Next.js 14 (App Router, TypeScript)
- Tailwind CSS (v4)
- Socket.IO (real-time communication)
- Express (custom server)
- Framer Motion (animations)
npm install
npm run devOpen http://localhost:3000 in your browser.
- Enter your name and Create Room
- Share the 4-letter room code with your opponent
- Opponent enters the code to Join Room
- Host clicks Start Game
- Both players see 4 cards — click cards and operators to build a math expression that equals the target
- First correct submission wins the round!
- Use all 4 card values exactly once
- Use any combination of
+,−,×,÷and parentheses - Card values: A=1, 2–10, J=11, Q=12, K=13
- First player to submit a valid expression wins the round
- Add Redis adapter for Socket.IO → horizontal scaling
- Extract game server to a standalone microservice
- Add authentication + database for persistent leaderboards