Backend infers play direction; UI previews words and gates submit on legality #44
Reference in New Issue
Block a user
Delete Branch "feature/auto-play-direction"
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?
What
A single tile that only extends a word perpendicular to the client-declared direction was rejected. The UI always sent
dir=Hfor one-tile plays (thedirOverride/Controlstoggle was orphaned in the Stage 7 game rework, commit2c96c19), so placing "А" above "БАК" to form "АБАК" failed the solver's main-word-length check even though the word is in the dictionary. Diagnosed against the contour game019eb0e1-….How
internal/engine.resolveDirection): ≥2 tiles by the line they share; a lone tile by the axis it abuts (longer word wins, horizontal on a tie). Exhaustive unit tests + the АБАК regression.SubmitPlay/Evalwire requests, added toEvalResult. Journal replay keeps trusting the stored "H"/"V" (SubmitPlayDir) so a rebuilt game matches the committed one.game.previewWords); the make-move control is disabled until the play is confirmed legal; the "your turn" label hides while tiles are pending. OrphanedControls.sveltedeleted.ARCHITECTURE.md(§5/§9.1),FUNCTIONAL.md(+_ru) and the backend README.Tested locally
backend unit + integration (testcontainers), gateway, loadtest (build/vet/test), UI
check+ unit (153) +build+ e2e (100, Chromium + WebKit); gofmt clean.