How 23020640-cyber/ottv2-test works
OTTv2 is a browser-based 9×9 rock–paper–scissors chess game, offered as local two-player play and a four-board online arena. Players select and move pieces; shared game rules validate moves and determine wins. In the arena, the network layer adds seats, turn ownership, synchronized state, and spectator rendering through playhtml. The README documents these product flows; some HTML wiring and network implementation details are not included in the sampled source, so the graph omits uncertain links.
Main entry points: arenaNetwork.js Seats and network play · arena.html Arena interface · index.html Local game UI · gameLogic.js Move and win rules
Components 9
Game rules
- Move and win rules
gameLogic.js
Local game
- Local game UI
index.html
Online arena
- Arena interface
arena.html - Seats and network play
arenaNetwork.js - Board and seat state
arenaNetwork.js - playhtml sync
- playhtml server
Other components
- Local players
- Players and viewers
Connections 10
- Local players → Local game UI: play locally
- Local game UI → Move and win rules: use shared rules
- Players and viewers → Arena interface: join or watch
- Arena interface → Seats and network play: provide arena
- Seats and network play → Move and win rules: validate moves
- Seats and network play → Board and seat state: update state
- playhtml sync → Seats and network play: dispatch callbacks
- playhtml sync → playhtml server: sync state
- playhtml server → playhtml sync: broadcast state
- Seats and network play → Arena interface: render boards