Package scotlandyard.engine.impl

Examples of scotlandyard.engine.impl.Engine


  public void setup() throws Exception
  {
    String mp = "web/maps/palmerstonNorth.xml";
    gameId=(gameId==null||"optional".equals(gameId)?System.currentTimeMillis()+"":gameId);
    Game game = new Game(gameId,mp);
    Engine myEngine = Engine.instance();
    myEngine.games.put(game.getId(),game);
    game.setMapPath("/maps/palmerstonNorth.xml");

    myEngine.icons.put("x1.gif",false);
    myEngine.icons.put("d1.gif",false);
   
   
    IUser mrx = myEngine.login(mrxEmail,mrxName,"0");
    IUser detective = myEngine.login(detectiveEmail,detectiveName,"1");

    game.addPlayer(mrx,true);

    game.addPlayer(detective,false);
    IPlayer player = game.getPlayer(mrxHash);
View Full Code Here


  public void setup() throws Exception
  {
    String mp = "web/maps/palmerstonNorth.xml";
    gameId=(gameId==null||"optional".equals(gameId)?System.currentTimeMillis()+"":gameId);
    Game game = new Game(gameId,mp);
    Engine myEngine = Engine.instance();
    myEngine.games.put(game.getId(),game);
    game.setMapPath("/maps/palmerstonNorth.xml");

    myEngine.icons.put("x1.gif",false);
    myEngine.icons.put("d1.gif",false);
   
   
    IUser mrx = myEngine.login(mrxEmail,mrxName,"0");
    IUser detective = myEngine.login(detectiveEmail,detectiveName,"1");

    game.addPlayer(mrx,true);

    game.addPlayer(detective,false);
    IPlayer player = game.getPlayer(mrxHash);
View Full Code Here

  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    final PrintWriter out = response.getWriter();
    response.setHeader("Content-Type", "text/plain");
    try{
      final Engine engine = Engine.instance();
      String icon = request.getParameter("icon");
      String hash = request.getParameter("xhash");

      final IUser user = engine.getUser(hash);

      if(user!=null){
        user.setIcon(icon);
        for(IGame game:engine.games.values()){
          for(IPlayer player:game.getPlayers()){
View Full Code Here

  /**
   * beans must have an empty constructor
   */
  public WebUserBean() {
    Engine e = Engine.instance();
    if(e.icons.size()==0){
      e.icons.put("d0.gif",Boolean.FALSE);
      e.icons.put("d1.gif",Boolean.FALSE);
      e.icons.put("d2.gif",Boolean.FALSE);
      e.icons.put("d3.gif",Boolean.FALSE);
View Full Code Here

TOP

Related Classes of scotlandyard.engine.impl.Engine

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.