Package de.creepsmash.common.messages.server

Examples of de.creepsmash.common.messages.server.ScoreResponseMessage


    } else if (message instanceof RefreshMessage) {
      this.lobby.refresh(this.getClient());
      return this;
    } else if (message instanceof ScoreRequestMessage) {
      ScoreRequestMessage requestMessage = (ScoreRequestMessage) message;
      ScoreResponseMessage responseMessage = 
        HighscoreService.getScoreMessage(requestMessage.getPlayerName());
      this.getClient().send(responseMessage);
      return this;
    } else if (message instanceof HighscoreRequestMessage) {
      HighscoreRequestMessage requestMessage = (HighscoreRequestMessage) message;
View Full Code Here


          updateDataRequestMessage.getEmail()));
      this.getClient().send(m);
      return this;
    } else if (message instanceof ScoreRequestMessage) {
      ScoreRequestMessage requestMessage = (ScoreRequestMessage) message;
      ScoreResponseMessage responseMessage =
        HighscoreService.getScoreMessage(requestMessage.getPlayerName());
      this.getClient().send(responseMessage);
      return this;
    } else if (message instanceof DeleteRequestMessage) {
      DeleteResponseMessage m = new DeleteResponseMessage();
View Full Code Here

  /**
   * @param playerName the username.
   * @return a ScoreResponseMessage with the user's data.
   */
  public static ScoreResponseMessage getScoreMessage(String playerName) {
    ScoreResponseMessage scoreResponseMessage = new ScoreResponseMessage();
    Player player = AuthenticationService.getPlayer(playerName);
    if (player != null) {
      scoreResponseMessage.setPlayerName(player.getName());
      scoreResponseMessage.setPoints(player.getElopoints() - 500);
      scoreResponseMessage.setOldPoints(player.getOldElopoints() - 500)
    }
    return scoreResponseMessage;
  }
View Full Code Here

    } else if (UpdateDataResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new UpdateDataResponseMessage();
    } else if (ScoreResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new ScoreResponseMessage();
    } else if (DeleteResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new DeleteResponseMessage();
    } else if (PasswordResetResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.server.ScoreResponseMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.