Documentation ¶
Index ¶
- Constants
- Variables
- func Attacks(board []uint8, color uint8, enPassant []uint8) []uint8
- func CmdExperiment(c *cli.Context) error
- func CmdPerft(c *cli.Context) error
- func CmdPerftDivide(c *cli.Context) error
- func CmdPieces(c *cli.Context) error
- func ColorCode(color string) uint8
- func ColorName(color uint8) string
- func Contains(arr []uint8, v uint8) bool
- func DebugAttacks(list []uint8) string
- func DebugBoard(board []uint8) string
- func DebugGame(game Game) string
- func DebugHash(board []uint8) int
- func DebugMove(move *Move) string
- func DebugMoves(board []uint8, depth int, color uint8, enpassant []uint8) string
- func DebugPerft(depth int) string
- func DebugPerftDivide(depth int) string
- func DebugPos(i uint8) string
- func MakeMove(board []uint8, move *Move) []uint8
- func PieceCode(piece string) uint8
- func PieceName(piece uint8) string
- func PosCode(pos string) uint8
- func Save(game Game) string
- func UndoMove(board []uint8, move *Move) []uint8
- type Game
- type Move
- type PerftDivideResult
- type PerftResult
Constants ¶
View Source
const BISHOP uint8 = 1 << 3
View Source
const B_BISHOP uint8 = BISHOP | COLOR_BLACK
View Source
const B_KING uint8 = KING | COLOR_BLACK
View Source
const B_KNIGHT uint8 = KNIGHT | COLOR_BLACK
View Source
const B_PAWN uint8 = PAWN | COLOR_BLACK
View Source
const B_QUEEN uint8 = QUEEN | COLOR_BLACK
View Source
const B_ROOK uint8 = ROOK | COLOR_BLACK
View Source
const COLOR_BLACK uint8 = 1 << 7
View Source
const COLOR_WHITE uint8 = 1 << 6
View Source
const EMPTY uint8 = 0
View Source
const File = "abcdefgh"
View Source
const INVALID_MOVE uint8 = 255
View Source
const KING uint8 = 1 << 0
View Source
const KNIGHT uint8 = 1 << 4
View Source
const PAWN uint8 = 1 << 5
View Source
const QUEEN uint8 = 1 << 1
View Source
const ROOK uint8 = 1 << 2
View Source
const Rank = "12345678"
View Source
const W_BISHOP uint8 = BISHOP | COLOR_WHITE
View Source
const W_KING uint8 = KING | COLOR_WHITE
View Source
const W_KNIGHT uint8 = KNIGHT | COLOR_WHITE
View Source
const W_PAWN uint8 = PAWN | COLOR_WHITE
View Source
const W_QUEEN uint8 = QUEEN | COLOR_WHITE
View Source
const W_ROOK uint8 = ROOK | COLOR_WHITE
Variables ¶
View Source
var Start = []uint8{ B_ROOK, B_KNIGHT, B_BISHOP, B_QUEEN, B_KING, B_BISHOP, B_KNIGHT, B_ROOK, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_ROOK, W_KNIGHT, W_BISHOP, W_QUEEN, W_KING, W_BISHOP, W_KNIGHT, W_ROOK}
View Source
var Test = []uint8{ B_ROOK, B_KNIGHT, B_BISHOP, B_QUEEN, B_KING, B_BISHOP, B_KNIGHT, B_ROOK, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, B_PAWN, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, W_PAWN, EMPTY, EMPTY, EMPTY, EMPTY, W_PAWN, W_PAWN, W_PAWN, EMPTY, W_PAWN, W_PAWN, W_PAWN, W_PAWN, W_ROOK, W_KNIGHT, W_BISHOP, W_QUEEN, W_KING, W_BISHOP, W_KNIGHT, W_ROOK}
Functions ¶
func CmdExperiment ¶
func CmdPerftDivide ¶
func DebugAttacks ¶
func DebugBoard ¶
func DebugPerft ¶
func DebugPerftDivide ¶
Types ¶
type Game ¶
type PerftDivideResult ¶
func PerftDivide ¶
func PerftDivide(depth int) []PerftDivideResult
Source Files ¶
Click to show internal directories.
Click to hide internal directories.