mchess-server/types/common.go

19 lines
214 B
Go
Raw Normal View History

2023-06-12 20:32:31 +00:00
package types
2023-06-12 20:32:31 +00:00
type ChessColor string
const (
White ChessColor = "white"
Black ChessColor = "black"
)
2023-06-14 17:46:46 +00:00
func (c ChessColor) Opposite() ChessColor {
if c == White {
return Black
} else {
return White
}
}