flip7

April 13, 2026 · View on GitHub

Screenshot 2026-04-11 at 19 08 47

A terminal implementation of the Flip 7 card game, built with ratatui.

Workspace

  • crates/core — game rules, state machine, commands, and events
  • crates/net — networking layer (WebSocket server/client, mDNS discovery)
  • crates/tui — ratatui frontend

Running the TUI

cargo run -p tui

Game modes

Hotseat

From the main menu, pick Hotseat, add 3–15 players (press Tab to add, Enter to start). All players take turns on the same terminal.

LAN Multiplayer

From the main menu, pick LAN Play:

  • Host — enter your name, a lobby is created and advertised on the local network via mDNS. Press S to start once 3+ players have joined.
  • Join — browse discovered games on the network, pick one, and enter your name to join.

Each player controls only their own turn. The server validates commands so players cannot act for others.

In-game keys

KeyAction
HHit
SStay
19, AFChoose a target (when a targeted card is pending)
MBack to menu (game over)
RRematch with same players (game over)
EscBack / quit

Roadmap

  • Hotseat local play
  • LAN multiplayer