Documentation ¶
Overview ¶
Package gox provides defines basic datatypes and methods for creating a simple tic-tac-toe game.
Index ¶
Constants ¶
View Source
const BoardSize = 9
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIGame ¶
AIGame represents a tic-tac-toe game with one player being human, the other being an ai.
type Board ¶
type Board [3][3]Symbol
Board represents a tic-tac-toe field. (0, 0) is upper left corner, (2, 2) is lower right.
func (*Board) CheckWin ¶
CheckWin returns true if a player won and returns the corresponding symbol.
func (*Board) FreeFields ¶
FreeFields returns a slice containig (row, col) of unset fields.
Click to show internal directories.
Click to hide internal directories.