Documentation ¶
Overview ¶
Package state provides a way to visualise an 8x8 board as a 64 bit integer See https://www.chessprogramming.org/8x8_Board for an explanation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Fen ¶
type Fen string
TODO: maybe change this to xfen for 960? see https://en.wikipedia.org/wiki/X-FEN
func GenerateCMLXFen ¶
func GenerateCMLXFen generates a random number between 0 - 959 and maps it to the corresponding position using Scharnagl's table methods see https://en.wikipedia.org/wiki/Fischer_random_chess_numbering_scheme
type State ¶
type State struct {
Board Board
}
func NewCMLXGame ¶
Func NewCMLXGame will create a new State struct with the initial starting parameters of a chess 960 game
func NewCustomPosition ¶
Func NewCustomPosition will create a new State struct with the parameters from a specified FEN string
func NewStandardGame ¶
Func NewStandardGame will create a new State struct with the initial starting parameters of a standard chess game