Discover Packages
github.com/argusdusty/vulpes
games
ttt
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Jun 18, 2020
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type AI struct {
State ttt
Turn bool
}
AI uses vulpes to play perfect Tic-Tac-Toe
func NewAI(board [9]int ) *AI
NewAI returns a Tic-Tac-Toe AI from a given board
NewEmptyAI returns a Tic-Tac-Toe AI from an empty board
MakeMove takes the best move (searching to the given depth) and plays it, updating State. If the game is over, it returns the ending state, and makes no changes to State.
String returns a string representation of the game board
Source Files
¶
Click to show internal directories.
Click to hide internal directories.