Package de.creepsmash.common.messages.server

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


   * Creates a StartGameMessage with the current list of players.
   * @param players the game's players
   * @return a StartGameMessage.
   */
  private StartGameMessage createStartGameMessage(PlayerList players, int MapID) {
    StartGameMessage m = new StartGameMessage();
    List<Integer> list = new LinkedList<Integer>();
    for (PlayerInGame player : players) {
      list.add(player.getClient().getClientID());
    }
    m.setPlayers(list);
    m.setMapID(MapID);
    return m;
  }
View Full Code Here


    }else if (ChangeStrategyRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new ChangeStrategyRoundMessage();
    }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()) {
View Full Code Here

          JOptionPane.ERROR_MESSAGE);
      getCore().popScreen();     
    }
   
    if (m instanceof StartGameMessage) {
      StartGameMessage sgm = (StartGameMessage) m;
      List<Integer> list = sgm.getPlayers();
     
      for (int i = 0; i < list.size(); i++) {
        playersOrder.put(list.get(i), i);
      }
     
      this.mapId = sgm.getMapID();
     
      getCore().popScreen();   
      getCore().pushScreen(gamePanel);
      gamePanel.getLoop().setPlayersOrder(playersOrder);
      gamePanel.getLoop().setPlayers(players);
View Full Code Here

TOP

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

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.