Add board.sx, the headless Phase-1 match-3 core: - Gem enum (6 types, ordinal 0..5) + single-char dump alphabet. - Rng: a 32-bit LCG carried in s64, masked to 32 bits each step, so the stream is host-width independent and valid for any seed. - Board (8x8, row-major) with idx/at/set accessors and a seeded init that fills row-major, excluding any gem that would complete a 3-in-a-row with the two cells to the left or above — so the result has zero pre-existing matches. Single RNG draw per cell, always terminates. - board_dump: deterministic one-row-per-line textual snapshot. tests/board_init.sx seeds with a fixed seed, dumps the board, and asserts zero horizontal/vertical 3-in-a-row runs via an independent scan. Output and exit code are locked as goldens. App ios-sim build is unaffected (main.sx does not import the model yet).
10 lines
112 B
Plaintext
10 lines
112 B
Plaintext
RRPPOGRG
|
|
PGPOPRRO
|
|
YYBBYRYB
|
|
GBYYRGGP
|
|
OGBRRORY
|
|
BYRRPRBG
|
|
YOYYROBB
|
|
OROBPPRB
|
|
ok: board_init no-match invariant holds
|