Stage 13: alphabet on the wire (UI alphabet-agnostic, TODO-4) #14
Reference in New Issue
Block a user
Delete Branch "feature/stage-13-alphabet-on-the-wire"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes the UI alphabet-agnostic: live play exchanges per-variant alphabet indices (rack out; submit-play / evaluate / exchange / word-check in), and the client caches each variant's
(index, letter, value)table behindStateRequest.include_alphabet, rendering the rack and blank chooser from it. History / journal / GCG stay decoded concrete characters (ARCHITECTURE §9.1, unchanged). Discharges TODO-4.Wire (pkg/fbs): new
AlphabetEntry+PlayTile;StateView.rack→[ubyte]+alphabet;StateRequest.include_alphabet;SubmitPlay/Evaltiles→[PlayTile];Exchange/CheckWord→[ubyte](committed Go + TS regenerated).Backend:
engine.AlphabetTable+ cached per-variant codec +BlankIndex; the server edge maps index↔letter via a new thingame.Service.GameVariant; the domain API and the robot keep one letter-based play path. The gateway forwards indices verbatim (no alphabet table).UI:
lib/alphabet.tscache;codec.tsindex codec;premiums.tsgeometry-only; mock fixture table; display normalised to upper case (placement/board/checkword unchanged).Tests: Go
engine.AlphabetTableparity (EN/RU/Эрудит, ё=index 6 / value 0) + aGameVariantinttest; gateway transcode round-trips for the index/alphabet paths; UI codec + alphabet unit tests; premiums test trimmed to geometry. Go build/vet/gofmt/test green; UI check + 95 unit + build (90 KB gzip) + 48 chromium/webkit e2e green.