Examples of removePlayer()


Examples of org.scotlandyard.engine.Game.removePlayer()

    Assert.assertEquals(engine.startGame(game), "done");
    Assert.assertEquals(game.getGameStatus().toString(),GameStatus.STARTED.toString());

    Assert.assertTrue(game.removePlayer(user1.getEmail()));
    Assert.assertTrue(game.removePlayer(user2.getEmail()));
    try{
      game.removePlayer(user2.getEmail());
      Assert.assertFalse(true);
    }catch(GameException ex){
      Assert.assertTrue(true);
View Full Code Here

Examples of org.scotlandyard.engine.Game.removePlayer()

    Assert.assertEquals(game.getGameStatus().toString(),GameStatus.STARTED.toString());

    Assert.assertTrue(game.removePlayer(user1.getEmail()));
    Assert.assertTrue(game.removePlayer(user2.getEmail()));
    try{
      game.removePlayer(user2.getEmail());
      Assert.assertFalse(true);
    }catch(GameException ex){
      Assert.assertTrue(true);
    }
View Full Code Here

Examples of scotlandyard.engine.spec.IGame.removePlayer()

          throw new Exception("Unknown USER");
        }
        if(game.getStatus()!=IGame.NEW){
          throw new Exception("the game has already started.");
        }
        game.removePlayer("{\"msg\" : \""+user.getEmail()+"\"}");
       
      }catch(Exception e){
        out.print("{\"msg\" : \"EXCEPTION : "+(e.getMessage()+"").replace("\"", "'")+"\", \"className\" : \""+getClass().getName()+"\"}");
      }
  }
View Full Code Here

Examples of tablero.Square.removePlayer()

    if (j != null && c != null && tablero.isSquare(c)) {
      Set<Square> validas = getReachableSquares(j);
      if (validas.contains(c)) {
        Square antigua = j.getUbication();
        if (antigua != null)
          antigua.removePlayer(j);
        j.move(c);
        c.addPlayer(j);
        notificarUbicacionActualizada(j);
        if (c.getPlayerList().size() > 1)
          notifyTwoPlayersHere(j, c);
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.