Examples of StartGameResponseMessage


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

  private GameState handle(StartGameRequestMessage m, PlayerInGame sender) {
    Client client = sender.getClient();
    if (getGame().getClients().size() < 2) {
      logger.info(
          client + " tried to start game, but there aren't enough players");
      client.send(new StartGameResponseMessage(ResponseType.failed));
      return this;
    } else {
      client.send(new StartGameResponseMessage(ResponseType.ok));
      logger.info("players before shuffle: "
          + createStartGameMessage(getGame().getClients(),getGame().getMapId()));
      PlayerList players = getGame().getClients();
      players.shuffle();
      getGame().setClients(players);
View Full Code Here

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

    }else if (StartGameMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new StartGameMessage();
    } else if (StartGameResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new StartGameResponseMessage();
    } else if (UpgradeTowerRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new UpgradeTowerRoundMessage();
    } else if (KickedMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new KickedMessage();
View Full Code Here

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

     
    }
   
    if (m instanceof StartGameResponseMessage) {
     
      StartGameResponseMessage sgrm = (StartGameResponseMessage) m;
      if (sgrm.getResponseType() == IConstants.ResponseType.failed) {
        UIManager.put("OptionPane.background", Color.BLACK);
        UIManager.put("OptionPane.JButton.setForground", Color.BLACK);
        UIManager.put("Panel.background", Color.BLACK);
        UIManager.put("OptionPane.messageForeground", Color.GREEN);
        JOptionPane.showMessageDialog(this,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.