Finally block blowing up when no exception is thrown.

This commit is contained in:
friarsol
2020-11-27 21:55:01 -05:00
parent 833fe18420
commit a8b7d67d9a

View File

@@ -172,8 +172,12 @@ public class SimulateMatch {
} catch (Exception | StackOverflowError e) {
e.printStackTrace();
} finally {
g1.setGameOver(GameEndReason.Draw);
sw.stop();
if (sw.isStarted()) {
sw.stop();
}
if (!g1.isGameOver()) {
g1.setGameOver(GameEndReason.Draw);
}
}
List<GameLogEntry> log;