scrabble: single-word rule requires in-line connection #3

Merged
developer merged 1 commits from feature/single-word-connectivity into master 2026-06-14 12:46:10 +00:00

1 Commits

Author SHA1 Message Date
Ilia Denisov d70bd35470 scrabble: single-word rule requires in-line connection
Under PlayOptions.IgnoreCrossWords a play connected to the board through any
perpendicular contact, even one forming a non-word, because connected() reused
the standard rule's touchesPerpendicular test while cross-words were suppressed.
That let an all-new word merely abut the board sideways and be accepted, and the
generator, with relaxed cross-sets, offered such plays.

Require the main word to run through an existing tile along the play direction
when cross-words are ignored, and filter generated moves by the same predicate so
generation agrees with ValidatePlayOpts. Standard rules are unchanged.
2026-06-14 14:38:49 +02:00