Chess — Multiplayer Chess for Gallia Viewer

An interactive chess game that runs inside the Gallia Viewer. Play against an AI bot locally, or challenge other Adom users to multiplayer games via room codes or the public lobby.

Features

  • Complete chess engine — castling, en passant, pawn promotion, check, checkmate, stalemate, 50-move rule, insufficient material detection
  • Bot mode — minimax with alpha-beta pruning (depth 3) for a solid AI opponent
  • Multiplayer — host or join games with 4-character room codes, or browse the public lobby
  • Player names — pick your own or get a random scientist name (Einstein, Curie, Hawking...)
  • SVG pieces — clean, scalable chess pieces with clear white/black differentiation
  • Emote system — send floating emoji reactions during games
  • Move history — collapsible panel tracking all moves in algebraic notation
  • Captured pieces — see which pieces have been taken at a glance
  • Legal move indicators — dots show valid moves when you select a piece
  • Resign, rematch, leave — full game lifecycle with color-swapping rematches

How to Play

  1. Say "play chess" or invoke the /chess skill
  2. The chess app opens in the Gallia Viewer
  3. Choose your mode:
    • Play vs Bot — instant local game against the AI
    • Host Game — create a room, share the code, optionally make it public
    • Join Game — enter a code or pick from the public lobby

Technical Details

  • Single self-contained HTML file (~80KB) with inline CSS and JavaScript
  • No external dependencies — works entirely in the browser
  • Multiplayer powered by WebSocket relay server
  • Gallia dark theme with teal accent colors
  • Responsive layout that adapts to the viewer panel size