Drawless square board orthogonal connection game. Place a stone anywhere or flip a stone that is part of one of two simple patterns.
DEFINITIONS
To flip a stone means to replace it with a stone of the opposite color.
A surrounded stone is a stone that is either
a) orthogonally adjacent to three enemy stones, or
b) orthogonally adjacent to two enemy stones and diagonally adjacent to two enemy stones, provided that the former are diagonally adjacent to each other and each one of the latter is orthogonally adjacent to exactly one of the former.
Other adjacencies are irrelevant. The colored edges of the board count as stones of their respective colors. It is suggested that you construct the two patterns on the board once to have a better picture of them.
PLAY
Black plays first, then turns alternate. On their turn, a player must either place a stone of their color on an empty point of the board or flip a surrounded enemy stone. A stone that was flipped by the enemy on their latest turn still counts as a friendly stone for surrounding purposes.
It's illegal to flip a stone if the opponent could flip it back on their next turn.
If a player has no moves available on their turn, they must pass. Passing is otherwise not allowed. There will always be a move available to at least one of the players.
OBJECTIVE
If, at the start of a player's turn, there is a chain of orthogonally adjacent stones of their color touching the two opposite board edges of their color, that player wins. Draws are not possible. The winning condition isn't checked by the program in this implementation. |