Package org.scotlandyard.impl.engine.player

Examples of org.scotlandyard.impl.engine.player.Detective


//    if(!GameEngine.instance().getChatHistory().isEmpty()){
//                    throw new Exception("why would the game engine chat history have anything yet");
//    }
    before = new Date(System.currentTimeMillis());
    Thread.sleep(300);
    detective = new Detective("detective", "detective@scotlandyard.org");
    mrX = new MrX("detective", "detective@scotlandyard.org");
    chat = ChatImpl.getNewInstance(detective, mrX, "Hello");

    Thread.sleep(300);
    after = new Date(System.currentTimeMillis());
View Full Code Here


    BoardMap boardMap = BoardMapImpl.getNewInstance("pnth");
    boardMap.prepareMap("web/maps/pnth.xml");
    User user = UserImpl.getNewInstance("Hussain", "hussain@game.com");
    Game game = GameImpl.getNewInstance("new game", user,boardMap);
   
    Detective detective = new Detective(user);
    game.addDetective(detective);
   
    game.setPlayerPosition(detective.getEmail(), boardMap.getCoordinates().iterator().next().getLabel());
   
    GamePlayersJsonContainer container = new GamePlayersJsonContainer(game);
   
    assertNull(
        "mr x has not been initialized",
View Full Code Here

    GameEngine.instance().getLobby().removeAllGames();
    GameEngine.instance().getUsers().clear();
    GameEngine.instance().getBoardMaps().clear();

    creator = UserImpl.getNewInstance("player1", "player1@game.com");
    detective = new Detective(creator);

  }
View Full Code Here

    Assert.assertEquals(GameEngine.instance().getLobby().getAvailableGames().size(), 0);
    Assert.assertEquals(GameEngine.instance().getUsers().size(), 0);
    final Game game = GameImpl.getNewInstance(GAME, null, null);
    Assert.assertEquals(GameEngine.instance().getLobby().getAvailableGames().size(), 1);
    Assert.assertEquals(game.getDetectives().size(), 0);
    final Player player = new Detective(UserImpl.getNewInstance("s", "s"));
    Assert.assertEquals(GameEngine.instance().getUsers().size(), 1);
    game.addDetective((Detective)player);
    Assert.assertEquals(game.getDetectives().size(), 1);
    Assert.assertEquals(game.getPlayers().size(), 1);
    Assert.assertEquals(game.getPlayer("s"), player);
View Full Code Here

    Assert.assertEquals(engine.getLobby().getAvailableGames().size(), 0);

    final Game game = GameImpl.getNewInstance("game1", user1, boardMap);
    Assert.assertEquals(engine.getLobby().getAvailableGames().size(), 1);

    final Player player1 = new Detective(user1);
    final Player player2 = new MrX(user2);

    Assert.assertEquals(engine.getUsers().size(), 2);
    Assert.assertEquals(game.getDetectives().size(), 0);
    game.setMrX(player2);
View Full Code Here

TOP

Related Classes of org.scotlandyard.impl.engine.player.Detective

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.