31 lines
473 B
Go
31 lines
473 B
Go
package types
|
|
|
|
type ChessColor string
|
|
|
|
const (
|
|
NoColor ChessColor = "no_color"
|
|
White ChessColor = "white"
|
|
Black ChessColor = "black"
|
|
)
|
|
|
|
func (c ChessColor) Opposite() ChessColor {
|
|
if c == White {
|
|
return Black
|
|
} else {
|
|
return White
|
|
}
|
|
}
|
|
|
|
func (c ChessColor) String() string {
|
|
return string(c)
|
|
}
|
|
|
|
type AdditionalState struct {
|
|
BlackKingMoved bool
|
|
WhiteKingMoved bool
|
|
BlackHRookMoved bool
|
|
BlackARookMoved bool
|
|
WhiteHRookMoved bool
|
|
WhiteARookMoved bool
|
|
}
|