Skip to content

marinello/ttr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Ticket to Ride: Brazil

A browser-based multiplayer implementation of Ticket to Ride set on a Brazil map, built with Flask and WebSockets.

Features

  • 2–5 players in real-time via WebSockets
  • 25 Brazilian cities and 40+ routes
  • Full game rules: draw cards, claim routes, draw destination tickets
  • Locomotive (wild) cards
  • Longest path bonus (+10 pts)
  • Destination ticket scoring (positive/negative)
  • Last-round trigger when a player drops to ≤2 trains
  • Reconnect support for dropped players

Setup

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py

Then open http://localhost:5000 in your browser.

How to Play

  1. One player creates a room by entering a room code and their name, then clicks Join.
  2. Other players join using the same room code.
  3. The first player clicks Start Game (requires at least 2 players).
  4. Each player receives 4 train cards and must keep at least 2 of 3 dealt destination tickets.
  5. On your turn, choose one action:
    • Draw cards – take 2 cards from the deck or face-up display (locomotives count as both draws).
    • Claim a route – spend matching colored cards to claim a route between two cities.
    • Draw tickets – draw up to 3 destination tickets and keep at least 1.
  6. The last round triggers when any player has ≤2 trains remaining. Every other player gets one final turn.
  7. Final scores add/subtract destination ticket points and award +10 for the longest continuous path.

Stack

  • Backend: Python, Flask, Flask-SocketIO
  • Frontend: HTML/CSS/JS (single-page, served via Jinja2 template)
  • Transport: WebSockets (Socket.IO)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors