// Package game is the backend's game domain. It drives the in-process // scrabble-solver engine (internal/engine) over a single match and owns // everything the engine deliberately does not: persistence, scheduling and the // player-facing operations. // // Active games are event-sourced. Durably, a game is its games row plus an // append-only, dictionary-independent move journal (game_moves); the live // position is an engine.Game kept warm in an in-memory cache and rebuilt by // replaying the journal on a cache miss, which the engine's seeded bag makes // exact (docs/ARCHITECTURE.md ยง9). Each game is serialised by a per-game lock, // since engine.Game is not safe for concurrent use; on a persistence failure the // live game is evicted so the next access rebuilds from the journal. // // The Service exposes create, the play/pass/exchange/resign transitions with // validate-at-submit scoring, the one-per-game-plus-wallet hint, the unlimited // word-check tool with complaint capture, per-player game state, history and GCG // export, and the per-game turn-timeout sweeper that auto-resigns an overdue // player (honouring their daily away window). The HTTP surface that fronts these // operations is added with the gateway in a later stage. package game