2023-06-12 20:32:31 +00:00
|
|
|
package types
|
|
|
|
|
2023-06-20 21:53:54 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|