Discover Packages
github.com/argusdusty/vulpes
games
connect4
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: 2
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 connect4
Turn bool
}
AI uses vulpes to play Connect Four
func NewAI(board [6][7]int ) *AI
NewAI returns a Connect4 AI from a given board
NewEmptyAI returns a Connect4 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.