diff --git a/pkg/server/server.go b/pkg/server/server.go index 2f01d76..7154978 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -950,6 +950,8 @@ COMMANDS: if clientGame == nil { cmd.client.sendNotice("You are not currently in a match.") continue + } else if clientGame.Winner != 0 { + continue } if clientGame.Turn != cmd.client.playerNumber { @@ -992,6 +994,8 @@ COMMANDS: if clientGame == nil { cmd.client.sendNotice("You are not currently in a match.") continue + } else if clientGame.Winner != 0 { + continue } gameState := &bgammon.GameState{ @@ -1074,6 +1078,8 @@ COMMANDS: Reason: "You are not currently in a match.", }) continue + } else if clientGame.Winner != 0 { + continue } opponent := clientGame.opponent(cmd.client) @@ -1199,6 +1205,9 @@ COMMANDS: Reason: "You are not currently in a match.", }) continue + } else if clientGame.Winner != 0 { + clientGame.sendBoard(cmd.client) + continue } if clientGame.Turn != cmd.client.playerNumber { @@ -1379,6 +1388,8 @@ COMMANDS: if clientGame == nil { cmd.client.sendNotice("You are not currently in a match.") continue + } else if clientGame.Winner != 0 { + continue } if clientGame.Turn != cmd.client.playerNumber { @@ -1413,6 +1424,8 @@ COMMANDS: if clientGame == nil { cmd.client.sendNotice("You are not currently in a match.") continue + } else if clientGame.Winner != 0 { + continue } opponent := clientGame.opponent(cmd.client)