Fix 'ok' command

This commit is contained in:
Trevor Slocum 2023-12-08 14:04:05 -08:00
parent 5abce61fab
commit 8c4b5112ba

View file

@ -1213,6 +1213,11 @@ COMMANDS:
continue
}
if clientGame.Roll1 == 0 || clientGame.Roll2 == 0 {
cmd.client.sendNotice("You must roll first.")
continue
}
legalMoves := clientGame.LegalMoves(false)
if len(legalMoves) != 0 {
available := bgammon.FlipMoves(legalMoves, cmd.client.playerNumber)