A browser-based multiplayer implementation of Ticket to Ride set on a Brazil map, built with Flask and WebSockets.
- 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
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.pyThen open http://localhost:5000 in your browser.
- One player creates a room by entering a room code and their name, then clicks Join.
- Other players join using the same room code.
- The first player clicks Start Game (requires at least 2 players).
- Each player receives 4 train cards and must keep at least 2 of 3 dealt destination tickets.
- 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.
- The last round triggers when any player has ≤2 trains remaining. Every other player gets one final turn.
- Final scores add/subtract destination ticket points and award +10 for the longest continuous path.
- Backend: Python, Flask, Flask-SocketIO
- Frontend: HTML/CSS/JS (single-page, served via Jinja2 template)
- Transport: WebSockets (Socket.IO)