Skip to content

Selfo: no colour starts one move away from winning - #503

Merged
Perlkonig merged 1 commit into
AbstractPlay:developfrom
fjvico:selfo-start
Oct 14, 2026
Merged

Perlkonig merged 1 commit into
AbstractPlay:developfrom
fjvico:selfo-start

Conversation

@fjvico

@fjvico fjvico commented Oct 13, 2026 •

Copy link
Copy Markdown

The random start already rejected positions where the first player could win
with a single move. This extends the check to both colours.

Why: with the pie rule the second player can take the first player's colour,
and the second player could also win at once on the small board. In a
simulation of the generator (about 2000 starts per size), the radius-2 board
let through ~2% of starts where the second colour was one move from winning.
The larger boards had none.

  • New canWinInOne helper; randomStart rejects a position if either colour
    can win in one move.
  • Tests: no start has a colour one move from winning (radius 2, radius 2 with
    no-enclosure, and the default board), and a unit test for the helper.
  • gameinfo.urls now links the Wikipedia article on Selfo.
  • No translated strings are changed, so no locale files are touched.

npm run build passes and all Selfo tests pass.

@Perlkonig
Perlkonig merged commit d65728a into AbstractPlay:develop Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants