Extend the pure-sx board model with the model-level pieces P5 (input) and P7 (turn/goal loop) will call: - Turn accounting on Board: `moves_made` + configurable `move_limit` (DEFAULT_MOVE_LIMIT), with `moves_remaining()` derived from the two so the counters can't drift. `init` resets them. - Special-match flagging: `count_specials` tallies a detection round's maximal runs of length exactly 4 and length 5+, surfaced over a whole settle as Cascade.len4 / len5_plus (+ had_len4 / had_len5_plus). A hook for future special gems — detection only, no gem behavior. - `commit_swap`: the single player-move entry point. Legal swap → apply, resolve (scoring accrues), spend one move; illegal → revert, no move spent. Returns a PlayerMove with the settle's payout + special flags. Adds tests/turn.sx (+ golden) asserting: legal swap decrements the move counter by exactly 1 and accrues score; illegal swap leaves counter, score and board untouched; len4/len5+/len3 rounds set the documented flags. Existing goldens unchanged; ios-sim build compiles.
34 KiB
34 KiB