Package de.creepsmash.server

Examples of de.creepsmash.server.Client


  /**
   * Handle SEND_MESSAGE.
   * @param m the message.
   */
  protected void handle(SendMessageMessage m) {
    Client sender = this.game.getClients().get(m.getClientId()).getClient();
    this.game.sendAll(
        new MessageMessage(
          sender.getUserName(), m.getMessage()));
  }
View Full Code Here


   * Handles the ExitGameMessage.
   * @param m the message
   * @return the new state.
   */
  protected GameState handle(ExitGameMessage m) {
    Client client = this.game.getClients().get(m.getClientId()).getClient();
    return removeClient(client,  "EXIT_GAME");
  }
View Full Code Here

   * Handle LOGOUT (which may also signal a client disconnect).
   * @param m the message.
   * @return the new state.
   */
  protected GameState handle(LogoutMessage m) {
    Client client = this.game.getClients().get(m.getClientId()).getClient();
    return removeClient(client, "logged out");
  }
View Full Code Here

TOP

Related Classes of de.creepsmash.server.Client

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.