Open alexobviously opened 1 year ago
Use case: allow code like g.result == WonGameCheckMate(winner: Bishop.white)
g.result == WonGameCheckMate(winner: Bishop.white)
Probably even more useful is g.result.isWon(Bishop.white) (allowing the winner to be null also, in which case it's the same as a is WonGame check.
g.result.isWon(Bishop.white)
is WonGame
cc @callumbeaney
Use case: allow code like
g.result == WonGameCheckMate(winner: Bishop.white)
Probably even more useful is
g.result.isWon(Bishop.white)
(allowing the winner to be null also, in which case it's the same as ais WonGame
check.cc @callumbeaney