Package de.creepsmash.common.messages.server

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


        }
      }
    } catch (ConcurrentModificationException cme) {
      return this.playersMessage();
    }
    return new PlayersMessage(playerNames);
  }
View Full Code Here


      messageObject = new PlayerJoinedMessage();
    } else if (PlayerQuitMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new PlayerQuitMessage();
    } else if (PlayersMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new PlayersMessage();
    } else if (RegistrationResponseMessage.PATTERN.matcher(
        messageString).matches()) {
      messageObject = new RegistrationResponseMessage();
    } else if (RoundMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new RoundMessage();
View Full Code Here

    if (m instanceof GamesMessage) {
      this.setGameList((GamesMessage) m);
      this.setPlayerCountLabel();
    }
    if (m instanceof PlayersMessage) {
      PlayersMessage pm = (PlayersMessage) m;
      int size = this.playerlist.getModel().getSize();
      ArrayList<String> alist = new ArrayList<String>();
      for (int i = 0; i < size; i++) {
        alist.add((String) playerlist.getModel().getElementAt(i));
      }
      ArrayList<String> newPlayers = new ArrayList<String>();
      Enumeration<String> e = pm.getPlayerNames().keys();
      while (e.hasMoreElements()) {
        String nick = (String) e.nextElement().toString();
        nick += " [" + (String) pm.getPlayerNames().get(nick).toString() + "]";
        newPlayers.add(nick);
      }
//      int newSize = newPlayers.size();
//      if (size > newSize && size - newSize == 1) {
//        for (int j = 0; j < size; j++) {
View Full Code Here

TOP

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

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.