X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/7a79f5dd9d36c100b9ec5dc7f3f76e1dd9a6731f..949b74cf3b49121d913330b7cc254dd0bd30863b:/src/main/java/com/codingame/game/Referee.java?ds=inline diff --git a/src/main/java/com/codingame/game/Referee.java b/src/main/java/com/codingame/game/Referee.java index e6c941f..b678534 100644 --- a/src/main/java/com/codingame/game/Referee.java +++ b/src/main/java/com/codingame/game/Referee.java @@ -46,6 +46,8 @@ public class Referee extends AbstractReferee { public void gameTurn(int turn) { // System.err.println("Starting turn " + turn); + view.startTurn(); + boolean disqual = false; boolean victory = false; boolean exhausted = false; @@ -135,8 +137,8 @@ public class Referee extends AbstractReferee { } if (model.haveWinner()) { - int winner = model.getWinner(); - gameManager.addToGameSummary(GameManager.formatErrorMessage("Troll destroys " + gameManager.getPlayer(winner).getNicknameToken())); + int loser = model.getLoser(); + gameManager.addToGameSummary(GameManager.formatErrorMessage("Troll destroys " + gameManager.getPlayer(loser).getNicknameToken()) + "."); victory = true; } else if (model.exhausted()) exhausted = true; @@ -155,11 +157,11 @@ public class Referee extends AbstractReferee { int s1 = p1.getScore(); if (s0 > s1) { - gameManager.addToGameSummary(GameManager.formatSuccessMessage(p0.getNicknameToken() + " wins")); + gameManager.addToGameSummary(GameManager.formatSuccessMessage(p0.getNicknameToken() + " wins.")); p1.view.destroy(); } else if (s0 < s1) { - gameManager.addToGameSummary(GameManager.formatSuccessMessage(p1.getNicknameToken() + " wins")); + gameManager.addToGameSummary(GameManager.formatSuccessMessage(p1.getNicknameToken() + " wins.")); p0.view.destroy(); } else if (s0 < 0) {