Package de.creepsmash.common.messages.server

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


    }

    if (findGame(gameName) != null) {
      logger.info("client tried to create game '" + gameName
          + "' but a game with the same name exists already");
      sender.send(new CreateGameResponseMessage(ResponseType.failed));
      return null;
    }

    Game game =
      new Game(this.nextGameId++, gameName, mapId, maxPlayers, sender, Passwort, MaxEloPoints, MinEloPoints);
    logger.info("new game: " + game);
    this.games.add(game);
    game.addObserver(this);
    sender.send(new CreateGameResponseMessage(ResponseType.ok));

    this.clients.remove(sender);
    game.newClient(sender);

    sendAll(playersMessage());
View Full Code Here


    } else if (BuildCreepRoundMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new BuildCreepRoundMessage();
    } else if (CreateGameResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new CreateGameResponseMessage();
    } else if (ErrorMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new ErrorMessage();
    } else if (GamesMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new GamesMessage();
    } else if (HighscoreResponseMessage.PATTERN.matcher(messageString)
View Full Code Here

TOP

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

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.