Package games.stendhal.server.entity.mapstuff.spawner

Examples of games.stendhal.server.entity.mapstuff.spawner.SheepFood


    final StendhalRPZone zone = new StendhalRPZone("testzone", 10, 10);
    zone.add(meh);
    final RPObject foodobject = new RPObject();
    foodobject.put("amount", 1);

    final SheepFood food = new SheepFood(foodobject);
    assertTrue(food.getAmount() > 0);
    zone.add(food);

    assertTrue(meh.searchForFood());
    assertEquals("eat", meh.getIdea());
  }
View Full Code Here


    zone.add(meh);
    final RPObject foodobject = new RPObject();
    foodobject.put("amount", 1);
    foodobject.put("x", 3);
    foodobject.put("y", 3);
    final SheepFood food = new SheepFood(foodobject);
    assertTrue(food.getAmount() > 0);
    assertFalse(food.nextTo(meh));

    zone.add(food);
    assertFalse(zone.getSheepFoodList().isEmpty());
    assertTrue(meh.searchForFood());
    assertEquals("found food and thinks of it", "food", meh.getIdea());
View Full Code Here

    zone.add(meh);
    final RPObject foodobject = new RPObject();
    foodobject.put("amount", 1);
    foodobject.put("x", 2);
    foodobject.put("y", 2);
    final SheepFood food = new SheepFood(foodobject);
    assertTrue(food.getAmount() > 0);
    assertFalse(food.nextTo(meh));

    zone.add(food);

    for (int x = 0; x <= zone.getWidth(); x++) {
      for (int y = 0; y <= zone.getHeight(); y++) {
View Full Code Here

    zone.add(meh);
    final RPObject foodobject = new RPObject();
    foodobject.put("amount", 1);
    foodobject.put("x", 2);
    foodobject.put("y", 2);
    final SheepFood food = new SheepFood(foodobject);
    assertTrue(food.getAmount() > 0);
    assertFalse(food.nextTo(meh));

    final RPObject foodobject2 = new RPObject();
    foodobject2.put("amount", 1);
    foodobject2.put("x", 0);
    foodobject2.put("y", 3);
    final SheepFood food2 = new SheepFood(foodobject2);
    assertTrue(food2.getAmount() > 0);
    assertFalse(food2.nextTo(meh));

    zone.add(food2);

    assertTrue("no path found", meh.searchForFood());
    assertEquals("food", meh.getIdea());
View Full Code Here

   */
  @Test
  public void testEat() {
    final RPObject foodobject = new RPObject();
    foodobject.put("amount", 10);
    final SheepFood food = new SheepFood(foodobject);
   
    final Sheep meh = new Sheep();
   
    meh.setWeight(1);
    meh.setHP(5);
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.mapstuff.spawner.SheepFood

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.