Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LOSS means the game is over and the current player has lost the game. LOSS = iota // TIE means the game is over and ended in a tie. TIE // WIN means the game is over and the current player has won the game. WIN // UNFINISHED means the game is not yet over. UNFINISHED )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game interface { // Children returns the child nodes from this one. If the game is not ended, this must return at least 1 child. Children() []Game // Evaluate returns an evaluation of the current game state from the perspective of the current player. 'ending' must be one of {LOSS, TIE, WIN, UNFINISHED}. 'heuristic' is only required when ending is UNFINISHED. Evaluate() (ending int, heuristic float64) }
Game describes a two-player, zero-sum, turn-based game.
Click to show internal directories.
Click to hide internal directories.