A web-based version of the card game 6 nimmt! / 6 Takes! for playing with family or friends on a local network. No login, no database.
- Real-time multiplayer via WebSockets
- 2–10 players per game — any mix of humans and bots
- Each human on their own device (laptop, tablet, phone)
- Mobile-friendly layout with compact cards on small screens
- Reconnect after a dropped connection or a locked phone — your slot is held and your hand restored
- Manual card placement: cards reveal lowest-first and the owner clicks the row to place
- Player names shown on each played card so you can see who did what
- In-memory game state — restart the server to fully reset
- Host controls: choose end condition at game start ("first to N bull heads loses", default 66, or "fixed number of hands", default 5), kick players in the lobby, reset the whole room mid-game
- Per-player controls: Leave button returns you to the join screen; if you leave mid-game your seat is taken over by a bot so the rest of the table can keep playing
# 1. Install Node.js (LTS) if you don't have it
sudo apt update
sudo apt install -y nodejs npm
# Verify (need Node 18+)
node --version
# If your distro's nodejs is too old, install from NodeSource instead:
# curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# sudo apt install -y nodejs
# 2. Clone and install
git clone https://github.com/JMarcSyd/six-takes.git
cd six-takes
npm install
# 3. Run it
npm start
# → "6 Takes! server listening on http://0.0.0.0:3000"Players on the LAN open http://<server-ip>:3000 in any modern browser.
Create /etc/systemd/system/sixtakes.service:
[Unit]
Description=6 Takes! game server
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/six-takes
ExecStart=/usr/bin/node server.js
Restart=on-failure
Environment=PORT=3000
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl daemon-reload
sudo systemctl enable --now sixtakesIf you want to reach it on port 80 via Apache, enable a reverse proxy with WebSocket support:
sudo a2enmod proxy proxy_http proxy_wstunnel rewriteThen add a vhost (or extend an existing one):
<VirtualHost *:80>
ServerName sixtakes.lan
ProxyPreserveHost On
ProxyPass /socket.io/ ws://127.0.0.1:3000/socket.io/
ProxyPassReverse /socket.io/ ws://127.0.0.1:3000/socket.io/
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>If you don't need port 80, just running on :3000 directly is simpler.
- First person to join becomes the host. They pick the end condition, optionally add bot players, and click Start game.
- Each hand: 10 cards dealt to each player, 4 starting rows.
- Every round, all players simultaneously select a card (you can change your mind until everyone has locked in).
- Once all picks are in, the cards reveal sorted lowest-first. For each card in turn, the owner clicks the target row to place it:
- If your card is the 6th in a row → you take the previous 5 cards (penalty bull heads).
- If your card is lower than every row top → you choose which row to take.
- Bots place their own cards automatically after a short randomized delay.
- After 10 rounds the hand ends. Host clicks Deal next hand.
- Game ends per the chosen end condition. Lowest bull heads wins.
- Your browser stores a small reconnect token in
localStorage. If you refresh, lock your phone, or briefly lose Wi-Fi, you come back into the same seat with your hand intact. - The Leave button in the top-right returns you to the join screen. Mid-game leavers are converted to bots so the rest of the table can keep playing without a re-deal.
- The host has an extra Reset button (top-right) that wipes the room back to an empty lobby — equivalent to restarting the server.
server.js— Express + Socket.io transport and the single in-memory roomgame.js— Pure game rules (deck, dealing, trick resolution, scoring, bot heuristic)public/index.html,public/style.css,public/client.js— the browser UICLAUDE.md— architecture notes for future contributors / AI assistants
- Single room only — designed for one household. Two simultaneous games on the same server are not supported.
- Bots are pure CPU (a simple scoring heuristic in
game.js); no LLM or external service is involved.