- p.consumeStones(stones);
- gameManager.addToGameSummary(String.format("%s throws %d stone%s at the troll.", player.getNicknameToken(), stones, stones == 1 ? "" : "s"));
- delta += player.model.getMultiplier() * stones;
-
- if (stones < 0) {
- player.deactivate(player.getNicknameToken() + " CHEAT");
- gameManager.addToGameSummary(GameManager.formatErrorMessage(player.getNicknameToken() + " cheated. Banning account."));
- player.setScore(-1);
+ break;
+ }
+ player.view.displayMessage(player.messageString);
+ }
+
+ /* Update game model and view.
+ *
+ * As a special case, the "cheater" (sending out negative
+ * stones) handling is deferred here because we need to update
+ * its view for it to be funny. In the end, they're still
+ * disqualified.
+ *
+ * Gather other game end scenarios (actual victory or stone
+ * exhaustion).
+ */
+ int delta = 0;
+ boolean victory = false;
+ boolean exhausted = false;
+ if (! disqual) {
+ for (Player player : gameManager.getActivePlayers()) {
+ gameManager.addToGameSummary(String.format("%s throws %d stone%s at the troll.", player.getNicknameToken(), player.stoneThrow, player.stoneThrow == 1 ? "" : "s"));
+ delta += player.model.getMultiplier() * player.stoneThrow;
+
+ if (player.stoneThrow < 0) {
+ disqualify(player, "CHEAT", "cheated. Banning account.");