Versions in this module Expand all Collapse all v1 v1.0.3 Jun 4, 2021 v1.0.2 Jul 1, 2020 v1.0.1 Jun 8, 2020 v1.0.0 May 4, 2020 Changes in this version + var Directions = [8]Direction type Value + func Max(x, y Value) Value + func Min(x, y Value) Value v0 v0.8.0 Apr 24, 2020 Changes in this version + const ALPHA + const BETA + const Black + const ColorLength + const EXACT + const GB + const GamePhaseMax + const KB + const MB + const MaxDepth + const MaxMoves + const SqLength + const Vlength + const Vnone + const White + func FileDistance(f1 File, f2 File) int + func RankDistance(r1 Rank, r2 Rank) int + func SquareDistance(s1 Square, s2 Square) int + type Bitboard uint64 + const BbAll + const BbOne + const BbZero + const CenterFiles + const CenterRanks + const CenterSquares + const DiagDownA1 + const DiagDownB1 + const DiagDownC1 + const DiagDownD1 + const DiagDownE1 + const DiagDownF1 + const DiagDownG1 + const DiagDownH1 + const DiagDownH2 + const DiagDownH3 + const DiagDownH4 + const DiagDownH5 + const DiagDownH6 + const DiagDownH7 + const DiagDownH8 + const DiagUpA1 + const DiagUpA2 + const DiagUpA3 + const DiagUpA4 + const DiagUpA5 + const DiagUpA6 + const DiagUpA7 + const DiagUpA8 + const DiagUpB1 + const DiagUpC1 + const DiagUpD1 + const DiagUpE1 + const DiagUpF1 + const DiagUpG1 + const DiagUpH1 + const FileAMask + const FileA_Bb + const FileB_Bb + const FileC_Bb + const FileD_Bb + const FileE_Bb + const FileF_Bb + const FileG_Bb + const FileHMask + const FileH_Bb + const MsbMask + const Rank1_Bb + const Rank2_Bb + const Rank3_Bb + const Rank4_Bb + const Rank5_Bb + const Rank6_Bb + const Rank7_Bb + const Rank8Mask + const Rank8_Bb + func GetAttacksBb(pt PieceType, sq Square, occupied Bitboard) Bitboard + func GetMovesDiagDown(square Square, content Bitboard) Bitboard + func GetMovesDiagDownRotated(sq Square, rotated Bitboard) Bitboard + func GetMovesDiagUp(sq Square, content Bitboard) Bitboard + func GetMovesDiagUpRotated(sq Square, rotated Bitboard) Bitboard + func GetMovesOnFile(sq Square, content Bitboard) Bitboard + func GetMovesOnFileRotated(sq Square, rotated Bitboard) Bitboard + func GetMovesOnRank(sq Square, content Bitboard) Bitboard + func GetPawnAttacks(c Color, sq Square) Bitboard + func GetPseudoAttacks(pt PieceType, sq Square) Bitboard + func Intermediate(sq1 Square, sq2 Square) Bitboard + func KingSideCastleMask(c Color) Bitboard + func PopSquare(b Bitboard, s Square) Bitboard + func PushSquare(b Bitboard, s Square) Bitboard + func QueenSideCastMask(c Color) Bitboard + func RotateL45(b Bitboard) Bitboard + func RotateL90(b Bitboard) Bitboard + func RotateR45(b Bitboard) Bitboard + func RotateR90(b Bitboard) Bitboard + func ShiftBitboard(b Bitboard, d Direction) Bitboard + func SquaresBb(c Color) Bitboard + func (b *Bitboard) PopLsb() Square + func (b *Bitboard) PopSquare(s Square) Bitboard + func (b *Bitboard) PushSquare(s Square) Bitboard + func (b Bitboard) Has(s Square) bool + func (b Bitboard) Lsb() Square + func (b Bitboard) Msb() Square + func (b Bitboard) PopCount() int + func (b Bitboard) String() string + func (b Bitboard) StringBoard() string + func (b Bitboard) StringGrouped() string + type CastlingRights uint8 + const CastlingAny + const CastlingBlack + const CastlingBlackOO + const CastlingBlackOOO + const CastlingNone + const CastlingRightsLength + const CastlingWhite + const CastlingWhiteOO + const CastlingWhiteOOO + func GetCastlingRights(sq Square) CastlingRights + func (cr *CastlingRights) Add(rhs CastlingRights) CastlingRights + func (cr *CastlingRights) Remove(rhs CastlingRights) CastlingRights + func (cr CastlingRights) Has(rhs CastlingRights) bool + func (cr CastlingRights) String() string + type Color uint8 + func (c Color) Direction() int + func (c Color) Flip() Color + func (c Color) IsValid() bool + func (c Color) MoveDirection() Direction + func (c Color) PawnDoubleRank() Bitboard + func (c Color) PromotionRankBb() Bitboard + func (c Color) String() string + type Direction int8 + const East + const North + const Northeast + const Northwest + const South + const Southeast + const Southwest + const West + func (d Direction) String() string + type File uint8 + const FileA + const FileB + const FileC + const FileD + const FileE + const FileF + const FileG + const FileH + const FileNone + func (f File) Bb() Bitboard + func (f File) IsValid() bool + func (f File) String() string + type Magic struct + Attacks []Bitboard + Magic Bitboard + Mask Bitboard + Shift uint + type Move uint32 + const MoveNone + func CreateMove(from Square, to Square, t MoveType, promType PieceType) Move + func CreateMoveValue(from Square, to Square, t MoveType, promType PieceType, value Value) Move + func (m *Move) SetValue(v Value) Move + func (m Move) From() Square + func (m Move) IsValid() bool + func (m Move) MoveOf() Move + func (m Move) MoveType() MoveType + func (m Move) PromotionType() PieceType + func (m Move) String() string + func (m Move) StringBits() string + func (m Move) StringUci() string + func (m Move) To() Square + func (m Move) ValueOf() Value + type MoveType uint + const Castling + const EnPassant + const Normal + const Promotion + func (t MoveType) IsValid() bool + func (t MoveType) String() string + type Orientation uint8 + const E + const N + const NE + const NW + const S + const SE + const SW + const W + func (d Orientation) String() string + func (o Orientation) IsValid() bool + type Piece int8 + const BlackBishop + const BlackKing + const BlackKnight + const BlackPawn + const BlackQueen + const BlackRook + const PieceLength + const PieceNone + const WhiteBishop + const WhiteKing + const WhiteKnight + const WhitePawn + const WhiteQueen + const WhiteRook + func MakePiece(c Color, pt PieceType) Piece + func PieceFromChar(s string) Piece + func (p Piece) Char() string + func (p Piece) ColorOf() Color + func (p Piece) String() string + func (p Piece) TypeOf() PieceType + func (p Piece) ValueOf() Value + type PieceType int8 + const Bishop + const King + const Knight + const Pawn + const PtLength + const PtNone + const Queen + const Rook + func (pt PieceType) Char() string + func (pt PieceType) GamePhaseValue() int + func (pt PieceType) IsValid() bool + func (pt PieceType) String() string + func (pt PieceType) ValueOf() Value + type PrnG struct + type Rank uint8 + const Rank1 + const Rank2 + const Rank3 + const Rank4 + const Rank5 + const Rank6 + const Rank7 + const Rank8 + const RankLength + const RankNone + func (r Rank) Bb() Bitboard + func (r Rank) IsValid() bool + func (r Rank) String() string + type Score struct + EndGameValue int + MidGameValue int + func (s *Score) Add(a Score) + func (s *Score) String() string + func (s *Score) Sub(a Score) + func (s *Score) ValueFromScore(gpf float64) Value + type Square uint8 + const SqA1 + const SqA2 + const SqA3 + const SqA4 + const SqA5 + const SqA6 + const SqA7 + const SqA8 + const SqB1 + const SqB2 + const SqB3 + const SqB4 + const SqB5 + const SqB6 + const SqB7 + const SqB8 + const SqC1 + const SqC2 + const SqC3 + const SqC4 + const SqC5 + const SqC6 + const SqC7 + const SqC8 + const SqD1 + const SqD2 + const SqD3 + const SqD4 + const SqD5 + const SqD6 + const SqD7 + const SqD8 + const SqE1 + const SqE2 + const SqE3 + const SqE4 + const SqE5 + const SqE6 + const SqE7 + const SqE8 + const SqF1 + const SqF2 + const SqF3 + const SqF4 + const SqF5 + const SqF6 + const SqF7 + const SqF8 + const SqG1 + const SqG2 + const SqG3 + const SqG4 + const SqG5 + const SqG6 + const SqG7 + const SqG8 + const SqH1 + const SqH2 + const SqH3 + const SqH4 + const SqH5 + const SqH6 + const SqH7 + const SqH8 + const SqNone + func MakeSquare(s string) Square + func RotateSquareL45(sq Square) Square + func RotateSquareL90(sq Square) Square + func RotateSquareR45(sq Square) Square + func RotateSquareR90(sq Square) Square + func SquareOf(f File, r Rank) Square + func (sq Square) Bb() Bitboard + func (sq Square) CenterDistance() int + func (sq Square) FileEastMask() Bitboard + func (sq Square) FileOf() File + func (sq Square) FileWestMask() Bitboard + func (sq Square) FilesEastMask() Bitboard + func (sq Square) FilesWestMask() Bitboard + func (sq Square) Intermediate(sqTo Square) Bitboard + func (sq Square) IsValid() bool + func (sq Square) NeighbourFilesMask() Bitboard + func (sq Square) PassedPawnMask(c Color) Bitboard + func (sq Square) RankOf() Rank + func (sq Square) RanksNorthMask() Bitboard + func (sq Square) RanksSouthMask() Bitboard + func (sq Square) Ray(o Orientation) Bitboard + func (sq Square) String() string + func (sq Square) To(d Direction) Square + type Value int16 + const ValueCheckMate + const ValueCheckMateThreshold + const ValueDraw + const ValueInf + const ValueMax + const ValueMin + const ValueNA + const ValueOne + const ValueZero + func PosEndValue(p Piece, sq Square) Value + func PosMidValue(p Piece, sq Square) Value + func PosValue(p Piece, sq Square, gp int) Value + func (v Value) IsCheckMateValue() bool + func (v Value) IsValid() bool + func (v Value) String() string + type ValueType int8 + func (vt ValueType) IsValid() bool + func (vt ValueType) String() string