Repository navigation
Selfo: no colour starts one move away from winning - #503
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
canWinInOnehelper;randomStartrejects a position if either colourcan win in one move.
no-enclosure, and the default board), and a unit test for the helper.gameinfo.urlsnow links the Wikipedia article on Selfo.npm run buildpasses and all Selfo tests pass.