Package scotlandyard.server

Examples of scotlandyard.server.GameServer


  @Override
  public BoardState getBoardState() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    return game.getBoardState();
  }
View Full Code Here


  @Override
  public void move(int destination) {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
    Player player = (Player)session.getAttribute("PlayerInstance");
    System.out.println(player.getName()+" esta tentando se mover para "+destination);
    game.move(player, destination);
  }
View Full Code Here

  @Override
  public void interfaceReady() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
    Player player = (Player)session.getAttribute("PlayerInstance");
   
    game.checkAllInterfaceLoaded(player);
  }
View Full Code Here

  @Override
  public String getMyGameName() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    return game.getGameName();
  }
View Full Code Here

  @Override
  public String[] getCurrentPlayingOrder() {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    return game.getCurrentPlayingOrder();
  }
View Full Code Here

  @Override
  public void enviarResposta(String resposta) {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    game.anotarResposta(resposta);
  }
View Full Code Here

    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    Player playerName = (Player)session.getAttribute("PlayerInstance");
   
    System.out.println(playerName);
    GameServer game = MainServer.getMainServerInstance().getGameServerByGameName(gameName);
   
    session.setAttribute("GameServerInstance",game );
    //session.setAttribute("PlayerName", playerName);
    // see MainServerManagementTest
    game.joinGame(playerName);
  }
View Full Code Here

  @Override
  public void quitGame(String gameName) {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    Player playerName = (Player)session.getAttribute("PlayerInstance");
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
   
    game.quitGame(playerName);
    session.removeAttribute("GameServerInstance");
  }
View Full Code Here

    HttpSession session = request.getSession();
    Player playerName = (Player)session.getAttribute("PlayerInstance");
   
    // see MainServerManagementTest
    MainServer.getMainServerInstance().openGame(gameName);
    GameServer game = MainServer.getMainServerInstance().getGameServerByGameName(gameName);
    game.setCaso (caseNumber);
    session.setAttribute("GameServerInstance", game);
    game.joinGame(playerName);
  }
View Full Code Here

  @Override
  public String[] getPlayerList(String gameName) {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
   
    GameServer game = (GameServer)session.getAttribute("GameServerInstance");
    return game.getPlayerNames();
  }
View Full Code Here

TOP

Related Classes of scotlandyard.server.GameServer

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.