Skip to content

024dsun/24

Repository files navigation

Make 24 — Valentine's Card Challenge ♥

A real-time multiplayer card math game where two players race to combine 4 poker cards using arithmetic operations to hit a target number.

Features

  • 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

Tech Stack

  • Next.js 14 (App Router, TypeScript)
  • Tailwind CSS (v4)
  • Socket.IO (real-time communication)
  • Express (custom server)
  • Framer Motion (animations)

Getting Started

npm install
npm run dev

Open http://localhost:3000 in your browser.

How to Play

  1. Enter your name and Create Room
  2. Share the 4-letter room code with your opponent
  3. Opponent enters the code to Join Room
  4. Host clicks Start Game
  5. Both players see 4 cards — click cards and operators to build a math expression that equals the target
  6. First correct submission wins the round!

Game Rules

  • 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

Scalability Path

  • Add Redis adapter for Socket.IO → horizontal scaling
  • Extract game server to a standalone microservice
  • Add authentication + database for persistent leaderboards

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors