Fix handling finished acey-deucey games
This commit is contained in:
parent
262d006c71
commit
a2fb60cf35
1 changed files with 13 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue