mchess-server/types/common.go

27 lines
414 B
Go
Raw Permalink Normal View History

2023-06-12 20:32:31 +00:00
package types
type ChessColor string
const (
NoColor ChessColor = "no_color"
White ChessColor = "white"
Black ChessColor = "black"
2023-06-12 20:32:31 +00:00
)
2023-06-14 17:46:46 +00:00
func (c ChessColor) Opposite() ChessColor {
if c == White {
return Black
} else {
return White
}
}
2023-07-05 19:15:01 +00:00
type AdditionalState struct {
BlackKingMoved bool
WhiteKingMoved bool
BlackHRookMoved bool
BlackARookMoved bool
WhiteHRookMoved bool
WhiteARookMoved bool
}