Skip to content

sk364/quinline

Repository files navigation

QuinLine - Multiplayer Card Game

QuinLine is a classic card + board game of strategy and luck, uniting (not always ;-;) friends and families together. Players form a line of five coins by using the cards distributed to them. Make your own and stop others from forming the QuinLine.

Features

  • Real-time Multiplayer: WebSocket-based gameplay for instant updates
  • 2-3 Player Support: Configurable game sizes
  • Room-Based Games: Simple room code system for joining games

Quick Start

Prerequisites

  • Python 3.13+
  • Node.js 18+
  • PostgreSQL
  • Redis

Backend Setup

  1. Navigate to backend directory:

    cd backend
  2. Create and activate virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Create PostgreSQL database:

    createdb quinline_db
  5. Run migrations:

    python manage.py migrate
  6. Seed card data:

    python manage.py seed_cards

Frontend Setup

  1. Install dependencies (from project root):

    npm install
  2. Create environment file:

    cp .env.local.example .env.local

Running the Application

Start Redis:

redis-server

Start Django:

cd backend
source venv/bin/activate
python manage.py runserver

Start Next.js:

npm run dev

Access the Application

How to Play

Game Setup

  1. One player creates a game and shares the room code
  2. Other players join using the room code
  3. Game starts automatically when all players join

Gameplay

  1. Select a Card: Click a card from your hand
  2. Place Your Coin: Click a valid position on the board
  3. Pick a New Card: Draw a card to end your turn

Rules

  • Match your card to a board position to place your coin
  • 2-eyed Jacks are wild - place on any empty space
  • 1-eyed Jacks remove opponent coins (not from completed quinlines)
  • Corner spaces are free and count as wildcards in quinlines
  • Create quinlines of 5 coins in a row (horizontal, vertical, or diagonal)
  • Win Condition:
    • 2 players: First to complete 2 quinlines
    • 3 players: First to complete 1 quinline

Troubleshooting

PostgreSQL Connection Error

  • Ensure PostgreSQL is running
  • Check database exists: psql -l

Redis Connection Error

  • Ensure Redis is running: redis-cli ping

WebSocket Connection Failed

  • Check Django is running on port 8000
  • Check Redis is running

About

QuinLine is a classic card + board game of strategy and luck, uniting (not always ;-;) friends and families together. Players form a line of five coins by using the cards distributed to them. Make your own and stop others from forming the QuinLine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors