Premium Competitive Programming Games Platform.
A multiplayer arena where Codeforces problems meet real-time strategy, tug-of-war battles, and tactical board games.
- Bingo: Classic 5×5 grid. Solve CF problems to claim tiles. First to complete a line wins (Classic and Replace modes supported).
- Tug of War: Two sides, one rope. Solve harder problems to pull the flag your way (Classic and Grid modes supported).
- Ticket to Ride: Europe map with cities and tracks. Earn coins by solving problems in the marketplace. Spend coins to claim train routes, complete destination tickets, and build stations to bypass opponent blocks.
- Frontend: Next.js (React 19), Framer Motion, Tailwind CSS
- Database: Prisma ORM with PostgreSQL (Neon)
- Real-time Sync: Pusher Websockets for instant Ticket to Ride map updates
- Styling: Tailwind CSS, Radix UI
Navigate to the bingo-cp folder and run:
npm installCreate a .env file in the bingo-cp root. You can base it on .env.example:
# Connection URL for Neon/PostgreSQL database
DATABASE_URL="postgresql://user:pass@host/db?sslmode=require"
DIRECT_URL="postgresql://user:pass@host/db?sslmode=require"
# Polling and Cooldown Gating
NEXT_PUBLIC_POLL_INTERVAL_MS=15000
POLLING_COOLDOWN_SECONDS=10
CODEFORCES_CACHE_DURATION_MS=10000
# Pusher Channels Config (for Ticket to Ride real-time sync)
PUSHER_APP_ID="your_pusher_app_id"
NEXT_PUBLIC_PUSHER_KEY="your_pusher_key"
PUSHER_SECRET="your_pusher_secret"
NEXT_PUBLIC_PUSHER_CLUSTER="your_pusher_cluster"Prisma client generation, schema pushing, and map seeding are handled automatically:
npx prisma generate
npx prisma db push
npx prisma db seed(Note: Seeding loads the default Europe map coordinates and connections so you can play Ticket to Ride immediately).
npm run devOpen http://localhost:3000 in your browser.
Contributions are welcome! If you'd like to:
- Suggest or build new game modes.
- Draw new maps for Ticket to Ride.
- Improve Codeforces API reliability.
Please submit a Pull Request or open an issue on the repository: LegendXAnurag/CP-Games.