Examples of GameServer


Examples of scotlandyard.server.GameServer

  public void readyStartGame() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
   
    Player player = (Player)session.getAttribute("PlayerInstance");
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    game.readyStartGame(player);
    System.out.println(player.getName() + " pediu para comecar o jogo.");
    //Player asked, try to startGame
   
  }
View Full Code Here

Examples of scotlandyard.server.GameServer

  @Override
  public void stopCometServer() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    //System.out.println("PreGameService: pedindo para parar MyCometServlet");
    //game.stopServer = true;
  }
View Full Code Here

Examples of scotlandyard.server.GameServer

    //Then wait for reconnection!
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
   
    Player player = (Player)session.getAttribute("PlayerInstance");
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    //Se ele est� ligado a um jogo
    //E se esse jogo j� come�ou
    if (game != null && game.isRunning()){
      System.out.println("Player "+player.getName()+" disconnected/closed the browser while playing!");
      MainServer.getMainServerInstance().playerDisconnected(player, game);
    }
    else{
      System.out.println("Closed browser BUT is not playing");
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.