27 lines
414 B
Go
27 lines
414 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
|
|
}
|
|
}
|
|
|
|
type AdditionalState struct {
|
|
BlackKingMoved bool
|
|
WhiteKingMoved bool
|
|
BlackHRookMoved bool
|
|
BlackARookMoved bool
|
|
WhiteHRookMoved bool
|
|
WhiteARookMoved bool
|
|
}
|