Documentation ¶
Index ¶
- func ValidateFen(fen string) error
- type Chess
- func (c *Chess) Ascii() string
- func (c *Chess) Attackers(square string, attackedBy string) []string
- func (c *Chess) Board() [][]*schemas.Square
- func (c *Chess) Clear(preserveHeaders bool)
- func (c *Chess) DeleteComments() []schemas.Comment
- func (c *Chess) Fen() string
- func (c *Chess) Get(square string) *schemas.Piece
- func (c *Chess) GetCastlingRights(color string) *schemas.CastlingRights
- func (c *Chess) GetComment() string
- func (c *Chess) GetComments() []schemas.Comment
- func (c *Chess) Header(headers map[string]string) map[string]string
- func (c *Chess) IsAttacked(square string, attackedBy string) bool
- func (c *Chess) IsCheck() bool
- func (c *Chess) IsCheckmate() bool
- func (c *Chess) IsDraw() bool
- func (c *Chess) IsGameOver() bool
- func (c *Chess) IsInsufficientMaterial() bool
- func (c *Chess) IsStalemate() bool
- func (c *Chess) IsThreeFoldRepetition() bool
- func (c *Chess) Load(fen string, skipValidation bool, preserveHeaders bool) error
- func (c *Chess) LoadPgn(pgn string, strict bool, newlineChar string) error
- func (c *Chess) Move(move string, strict bool) (*schemas.Move, error)
- func (c *Chess) MoveNumber() int
- func (c *Chess) Moves(square string, piece string) ([]string, []schemas.Move)
- func (c *Chess) Perft(depth int) int
- func (c *Chess) Pgn(newline string, maxWidth int) string
- func (c *Chess) Put(pieceType string, color string, square string) bool
- func (c *Chess) Reset() error
- func (c *Chess) SetCastlingRights(color string, rights map[string]bool) bool
- func (c *Chess) SetComment(comment string)
- func (c *Chess) SquareColor(square string) string
- func (c *Chess) Turn() string
- func (c *Chess) Undo() *schemas.Move
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFen ¶
Types ¶
type Chess ¶
type Chess struct {
// contains filtered or unexported fields
}
func NewGameFromFen ¶
func (*Chess) DeleteComments ¶
func (*Chess) GetCastlingRights ¶
func (c *Chess) GetCastlingRights(color string) *schemas.CastlingRights
func (*Chess) GetComment ¶
func (*Chess) GetComments ¶
func (*Chess) IsCheckmate ¶
func (*Chess) IsGameOver ¶
func (*Chess) IsInsufficientMaterial ¶
func (*Chess) IsStalemate ¶
func (*Chess) IsThreeFoldRepetition ¶
func (*Chess) MoveNumber ¶
func (*Chess) SetCastlingRights ¶
func (*Chess) SetComment ¶
func (*Chess) SquareColor ¶
Source Files ¶
- ascii.go
- attack.go
- board.go
- castling_rights.go
- chess.go
- clear.go
- comments.go
- fen.go
- game_states.go
- get.go
- header.go
- history.go
- load.go
- load_pgn.go
- make_move.go
- move.go
- move_from_san.go
- move_number.go
- move_to_san.go
- moves.go
- perft.go
- pgn.go
- position_count.go
- prettier.go
- put.go
- reset.go
- square_color.go
- turn.go
- undo_move.go
- update.go
- validate_fen.go
Click to show internal directories.
Click to hide internal directories.