Exemplo n.º 1
0
  /** Set a message in the case of game over */
  void message() {
    if (state.isGameOver()) {

      graphics.gameOverSound();
      String msg = "";
      if (state.winner() == null) {
        msg = messages.tie();
      } else {
        String winner = state.winner().isNorth() ? "North" : "South";
        msg = messages.winnerIs(winner, state.score() + "");
      }
      graphics.setMessage(msg);
      publish(msg);
    }
  }