CoolFace
Apppublic

PavanRocks2045/Sequence

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

๐ŸŽด Sequence โ€” Online Multiplayer Board Game

Play the classic Sequence board game online with friends! Create a room, share the link, and enjoy real-time multiplayer gameplay.

Sequence Game Node.js Socket.IO

โœจ Features

  • โ€”Real-time Multiplayer โ€” Play with friends via shareable room links
  • โ€”Up to 3 Teams โ€” Blue, Green, and Red teams with neon-glow chips
  • โ€”Private Hands โ€” Each player only sees their own cards
  • โ€”Full Board Visibility โ€” See all placed chips on the 10ร—10 board
  • โ€”No Turn Timer โ€” Play at your own pace
  • โ€”Card Shuffle Animation โ€” Gorgeous deck-shuffling animation on game start
  • โ€”Premium Dark UI โ€” Glassmorphism design with dark theme
  • โ€”Jack Mechanics โ€” Two-eyed jacks (wild) and one-eyed jacks (remove)
  • โ€”Sequence Detection โ€” Automatic win detection for 5-in-a-row

๐Ÿš€ Quick Start (Local)

bash
# Clone the repo
git clone https://github.com/Pavan20045/sequence.git
cd sequence

# Install dependencies
npm install

# Start the server
npm start

Open http://localhost:3000 in your browser. Share the room code with friends!

๐ŸŽฏ How to Play

  1. 1.Create a Game โ€” Enter your name and click "Create Game"
  2. 2.Share the Room Code โ€” Send the code or link to friends
  3. 3.Choose Teams โ€” Each player selects Blue, Green, or Red
  4. 4.Start โ€” Host clicks "Start Game"
  5. 5.Play Cards โ€” Select a card from your hand, click the matching board space
  6. 6.Make Sequences โ€” Get 5 chips in a row (horizontal, vertical, or diagonal)
  7. 7.Win! โ€” First team to complete the required sequences wins!

Special Cards

  • โ€”Two-Eyed Jacks (Jโ™ฆ, Jโ™ฃ) โ€” Wild! Place your chip on any empty space
  • โ€”One-Eyed Jacks (Jโ™ , Jโ™ฅ) โ€” Remove an opponent's chip from the board
  • โ€”Corner Spaces โ€” Free for all teams (count toward any sequence)

๐Ÿ“ฆ Deployment

Vercel

bash
# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod
Note: Vercel uses serverless functions. WebSocket support requires special configuration. For full real-time multiplayer, use a platform that supports persistent WebSocket connections (like Hugging Face Spaces, Railway, or Render).

Hugging Face Spaces (Docker)

  1. 1.Create a new Space on Hugging Face
  2. 2.Select Docker as the SDK
  3. 3.Push this repo to the Space:
bash
# Add HF remote
git remote add hf https://huggingface.co/spaces/PavanRocks2045/Sequence

# Push
git push hf main

The Dockerfile is pre-configured to use port 7860 (HF Spaces default).

Railway / Render

Simply connect your GitHub repo โ€” both platforms auto-detect Node.js projects.

๐Ÿ›  Tech Stack

LayerTech
ServerNode.js + Express
Real-timeSocket.IO
FrontendVanilla HTML/CSS/JS
StylingCustom CSS (Dark Glassmorphism)
FontOutfit

๐Ÿ“ Project Structure

sequence-game/
โ”œโ”€โ”€ server.js          # Express + Socket.IO server
โ”œโ”€โ”€ gameLogic.js       # Core game logic (board, deck, sequences)
โ”œโ”€โ”€ Dockerfile         # Docker config for HF Spaces
โ”œโ”€โ”€ vercel.json        # Vercel deployment config
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ public/
    โ”œโ”€โ”€ index.html     # Single-page app
    โ”œโ”€โ”€ css/
    โ”‚   โ””โ”€โ”€ style.css  # Premium dark theme
    โ””โ”€โ”€ js/
        โ””โ”€โ”€ app.js     # Client-side game logic

๐Ÿ“œ License

MIT โ€” Feel free to fork and modify!