Documentation ¶
Index ¶
Constants ¶
View Source
const ( FigureTypeKing = "KING" FigureTypeBishop = "BISHOP" FigureTypeRook = "ROOK" )
Types of figures
Variables ¶
View Source
var ( ErrCoordinatesNotValid = errors.New("figure coordinates not valid") // "figure coordinates not valid" ErrHorizontalCoordinateNotValid = errors.New("horizontal coordinate not valid") // "horizontal coordinate not valid" ErrVerticalCoordinateNotValid = errors.New("vertical coordinate not valid") // "vertical coordinate not valid" ErrKingCoordinatesNotValid = errors.New("king coordinates not valid") // "king coordinates not valid" ErrRookCoordinatesNotValid = errors.New("rook coordinates not valid") // "rook coordinates not valid" ErrBishopCoordinatesNotValid = errors.New("bishop coordinates not valid") // "bishop coordinates not valid" )
Errors coordinates by diffrents figures. Errors returned by king danger calculator
Functions ¶
This section is empty.
Types ¶
type ChessKingUnderDangerCalculator ¶
type ChessKingUnderDangerCalculator interface { IsKingUnderAttackRook(figureCoordinates, kingCoordinates string) (bool, error) IsKingUnderAttackBishop(figureCoordinates, kingCoordinates string) (bool, error) }
Calculator for danger to king from figures
type ChessLib ¶
Chess library implementation
func NewChessKingUnderDangerCalculator ¶
func NewChessKingUnderDangerCalculator() *ChessLib
Create ChessKingUnderDangerCalculator instance
type LoggerImpl ¶
type LoggerImpl struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(isDebug bool) *LoggerImpl
Click to show internal directories.
Click to hide internal directories.