Package games.stendhal.server.entity.player

Examples of games.stendhal.server.entity.player.Player.incProducedCountForItem()


  @Test
  public void testFire() {
    PlayerProducedNumberOfItemsCondition condition = new PlayerProducedNumberOfItemsCondition(5, "flour");
    Player player = PlayerTestHelper.createPlayer("producer");
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("iron", 12);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 4);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 2);
    assertThat(condition.fire(player, null, null), is(true));
View Full Code Here


    PlayerProducedNumberOfItemsCondition condition = new PlayerProducedNumberOfItemsCondition(5, "flour");
    Player player = PlayerTestHelper.createPlayer("producer");
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("iron", 12);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 4);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 2);
    assertThat(condition.fire(player, null, null), is(true));
  }
View Full Code Here

    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("iron", 12);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 4);
    assertThat(condition.fire(player, null, null), is(false));
    player.incProducedCountForItem("flour", 2);
    assertThat(condition.fire(player, null, null), is(true));
  }

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