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);
}
return ("{\"msg\" : \"OK\"}");