Package scotlandyard.engine.spec

Examples of scotlandyard.engine.spec.IGame


          if(parameters.get("selected_game")!=null){
            game_id  = parameters.get("selected_game");
          }
          if(game_id==null || "".equals(game_id)){throw new Exception("Game id is missing");}

          final IGame game = Engine.instance().games.get(game_id);
          if(game==null){throw new Exception("GAME is unknow");}

          final IPlayer player = game.getPlayer(xhash);
          if(player==null){throw new Exception("UNKNOWN Player");}

          sb.append("<div class='player_tickets'><table cellpadding='2' class='tokens'>");
          final StringBuffer sb1 = new StringBuffer();
          final StringBuffer sb2 = new StringBuffer();
View Full Code Here


      if(parameters.get("selected_game")!=null){
        gameId  = parameters.get("selected_game");
      }
      if(gameId==null || "".equals(gameId)){throw new Exception("Game Id is unknown");}
     
      final IGame game = Engine.instance().games.get(gameId);
      if(game==null){throw new Exception("Game is unknown");}

          final IPlayer player = game.getPlayer(xhash);
          if(player==null){throw new Exception("player is unknown");}

          final Integer newPosition = Integer.parseInt(parameters.get("newPosition"));
          if(newPosition==null){throw new Exception("New position is unknown");}

          final Integer transport = Integer.parseInt(parameters.get("transport"));
          if(transport==null){throw new Exception("Transport is unknown");}

          game.movePlayer(player.getEmail(), newPosition, transport);
         
          if(player.isMrx()){
            String msg = "<img src='http://scotlandyard.comule.com/get_icon.php?icon="+((int)Math.pow(2,transport))+"' width='32' height='32' alt='"+ BMap.convTransport(transport)+"'/>["+BMap.convTransport(transport)+"] was used by Mr X";
            new send_chat("SYSTEM",msg).processRequest(sid);
          }
View Full Code Here

TOP

Related Classes of scotlandyard.engine.spec.IGame

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.