mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
fix sw.stop bug, added draw condition for timeouts and both players life 0
This commit is contained in:
@@ -203,8 +203,7 @@ public class SimulateMatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If both players life totals to 0 in a single turn, the game should end in a draw
|
// If both players life totals to 0 in a single turn, the game should end in a draw
|
||||||
if(g1.getOutcome().getLifeDelta() == 0){
|
if(g1.getOutcome().isDraw()){
|
||||||
g1.setGameOver(GameEndReason.Draw);
|
|
||||||
System.out.println(String.format("Game %d ended in a Draw! Took %d ms.", 1+iGame, sw.getTime()));
|
System.out.println(String.format("Game %d ended in a Draw! Took %d ms.", 1+iGame, sw.getTime()));
|
||||||
} else {
|
} else {
|
||||||
System.out.println(String.format("\nGame %d ended in %d ms. %s has won!\n", 1+iGame, sw.getTime(), g1.getOutcome().getWinningLobbyPlayer().getName()));
|
System.out.println(String.format("\nGame %d ended in %d ms. %s has won!\n", 1+iGame, sw.getTime(), g1.getOutcome().getWinningLobbyPlayer().getName()));
|
||||||
|
|||||||
Reference in New Issue
Block a user