Documentation
¶
Index ¶
Constants ¶
View Source
const ( P1 = 1 P2 = -1 EMPTY = 0 )
View Source
const ( C_VALUE = 1.41 DEPTH = 100 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Board ¶
func (*Board) ChangePerspective ¶
func (b *Board) ChangePerspective()
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) CheckGameOver ¶
func (*Engine) GetLegalMoves ¶
func (*Engine) GetOpponent ¶
type GameEngine ¶
type GameEngine interface { // Returns gameover (bool) & a value if there's a winner CheckGameOver(board *Board, lastMove int) (bool, int) // Get all available moves GetLegalMoves(board *Board) []int // Get the opponent of a player GetOpponent(player int) int // Play a move on the board PlayMove(board *Board, player int, move int) error }
Click to show internal directories.
Click to hide internal directories.