From 076ea5bbdda8751cd178b657157d3a08458b7c7b Mon Sep 17 00:00:00 2001 From: JBM Date: Wed, 20 May 2020 16:53:19 +0200 Subject: [PATCH 1/1] Early termination --- config/statement_en.html | 15 +++++++++++++++ src/main/java/com/codingame/game/Referee.java | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/config/statement_en.html b/config/statement_en.html index b47d627..88c6b65 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -79,4 +79,19 @@ Just read the sample code. You can figure this out. +
+

Change Log

+ +
diff --git a/src/main/java/com/codingame/game/Referee.java b/src/main/java/com/codingame/game/Referee.java index 4b1315b..6866b9b 100644 --- a/src/main/java/com/codingame/game/Referee.java +++ b/src/main/java/com/codingame/game/Referee.java @@ -269,6 +269,10 @@ public class Referee extends AbstractReferee { endGame(); } } + + if (p0.getStones() <= 0 && p1.getStones() <= 0) { + endGame(); + } } private void endGame() { -- 2.30.2