Examples of PlayerPositionImpl


Examples of org.scotlandyard.impl.engine.PlayerPositionImpl

    for(int i=0;i<objects.length;i++){
      try{
        final Player player     = (Player)    objects[i][0];
        final Coordinate coor = (Coordinateobjects[i][1];

        game.setPlayerPosition(new PlayerPositionImpl(game, player, coor)); // this must throw an exception
        counter--;// should not reach here
      }catch(GameException ex){
        counter++;
      }
    }

    Assert.assertEquals(counter, 3);

    game.setGameStatus(GameStatus.JUST_CREATED);

    final PlayerPosition playerPosition1 = new PlayerPositionImpl(game, detective, position1);

    game.setPlayerPosition( playerPosition1 );

    try{
      //this should throw an exception since it places a player
      //at the same position as another one is already there
      game.setPlayerPosition( new PlayerPositionImpl(game, mrx, position1));
      counter--;
    }catch(GameException ex){
      counter++;
    }
View Full Code Here

Examples of org.scotlandyard.impl.engine.PlayerPositionImpl

    detective=Detective.getNewInstance(game,user2);
    game.setGameStatus(GameStatus.STARTED);
    position1=boardMap.getCoordinate("0");
    position2=boardMap.getCoordinate("1");

    playerPosition1 = new PlayerPositionImpl(game, detective, position1);
    playerPosition2 = new PlayerPositionImpl(game, mrx, position2);

  }
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.