Exemplo n.º 1
0
  @Test
  public void createBoulderPosition() throws Exception {
    Statement p = new Print(f.createBoulderPosition(null));

    new Boulder(w, w.getCube(new Vector(1, 0, 0)));

    runStatementFor(u, p, 0.2);
    System.out.println("The above should print (1,0,0)");

    // Check whether task successfully finished
    assertEquals(null, u.getTask());
    assertEquals(0, u.getFaction().getScheduler().getNbTasks());
  }
Exemplo n.º 2
0
  @Test
  public void createWork() throws Exception {
    Statement work = f.createWork(new LiteralPosition(1, 0, 0), null);

    new Boulder(w, w.getCube(new Vector(1, 0, 0)));

    runStatementFor(u, work, 1 + 500 / u.getStrength());

    // Check whether task successfully finished
    assertEquals(null, u.getTask());
    assertEquals(0, u.getFaction().getScheduler().getNbTasks());
    assertTrue(u.isCarryingBoulder());
  }