mchess-server/types/common.go

26 lines
377 B
Go

package types
type ChessColor string
const (
White ChessColor = "white"
Black ChessColor = "black"
)
func (c ChessColor) Opposite() ChessColor {
if c == White {
return Black
} else {
return White
}
}
type AdditionalState struct {
BlackKingMoved bool
WhiteKingMoved bool
BlackHRookMoved bool
BlackARookMoved bool
WhiteHRookMoved bool
WhiteARookMoved bool
}