Examples of Allotment


Examples of games.stendhal.server.entity.mapstuff.area.Allotment

  @Test
  public void testGrowOnFertileGround() throws Exception {
    final FlowerGrower fl = new FlowerGrower();
    fl.setRipeness(0);
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final Entity entity = new Allotment();
    zone.add(entity);
    zone.add(fl);

    assertTrue(fl.isOnFreeFertileGround());
    fl.growNewFruit();
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.area.Allotment

  @Test
  public void testGrowOnFertileGround2() throws Exception {
    final FlowerGrower fl = new FlowerGrower();
    fl.setRipeness(0);
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final Entity entity = new Allotment();

    zone.add(fl);
    zone.add(entity);
    assertTrue(fl.isOnFreeFertileGround());
    fl.growNewFruit();
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.area.Allotment

  @Test
  public void testGrowFertileGroundElsewhere() throws Exception {
    final FlowerGrower fl = new FlowerGrower();
    fl.setRipeness(0);
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final Entity entity = new Allotment();
    entity.setPosition(10, 10);
    zone.add(fl);
    zone.add(entity);
    assertFalse(fl.isOnFreeFertileGround());
   
    // check it withers when grown
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.area.Allotment

  public void testGrowOnFreeFertileGroundReserved() throws Exception {
    final FlowerGrower fl = new FlowerGrower();
    final FlowerGrower fl2 = new FlowerGrower();
    fl.setRipeness(0);
    final StendhalRPZone zone = new StendhalRPZone("zone");
    final Entity entity = new Allotment();

    zone.add(fl);
    zone.add(fl2);
    zone.add(entity);
    assertFalse(fl.isOnFreeFertileGround());
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.area.Allotment

  public void configureZone(final StendhalRPZone zone, final Map<String, String> attributes) {
    if (zone != null) {
      if (isValid(attributes)) {

        try {
          final Allotment all = new Allotment();
          all.setPosition(Integer.parseInt(attributes.get("x")), Integer.parseInt(attributes.get("y")));
          all.setSize(Integer.parseInt(attributes.get("width")), Integer.parseInt(attributes.get("height")));
          all.hide();
          zone.add(all);
        } catch (final NumberFormatException e) {
          Logger.getLogger(FertileGrounds.class).error(
              "cannot create allotment in " + zone.getName() + ": " + e);
        }
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.