Examples of pickIdealCreature()


Examples of games.stendhal.server.maps.quests.DailyMonsterQuest.DailyQuestAction.pickIdealCreature()

  @Test
  public void testPickIdealCreature() {
    //final DailyMonsterQuest dmqp = new DailyMonsterQuest();
    final DailyMonsterQuest.DailyQuestAction dmqpick = new DailyQuestAction();
    CreatureTestHelper.generateRPClasses();
    assertNull("empty list", dmqpick.pickIdealCreature(-1, false, new LinkedList<Creature>()));
    final LinkedList<Creature> creatureList = new LinkedList<Creature>();
    creatureList.add(SingletonRepository.getEntityManager().getCreature("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(1000, false, creatureList).getName(), is("rat"));
    creatureList.add(SingletonRepository.getEntityManager().getCreature("balrog"));
View Full Code Here

Examples of games.stendhal.server.maps.quests.DailyMonsterQuest.DailyQuestAction.pickIdealCreature()

    final DailyMonsterQuest.DailyQuestAction dmqpick = new DailyQuestAction();
    CreatureTestHelper.generateRPClasses();
    assertNull("empty list", dmqpick.pickIdealCreature(-1, false, new LinkedList<Creature>()));
    final LinkedList<Creature> creatureList = new LinkedList<Creature>();
    creatureList.add(SingletonRepository.getEntityManager().getCreature("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(1000, false, creatureList).getName(), is("rat"));
    creatureList.add(SingletonRepository.getEntityManager().getCreature("balrog"));
    assertThat("rat and balrog in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));

  }
View Full Code Here

Examples of games.stendhal.server.maps.quests.DailyMonsterQuest.DailyQuestAction.pickIdealCreature()

    CreatureTestHelper.generateRPClasses();
    assertNull("empty list", dmqpick.pickIdealCreature(-1, false, new LinkedList<Creature>()));
    final LinkedList<Creature> creatureList = new LinkedList<Creature>();
    creatureList.add(SingletonRepository.getEntityManager().getCreature("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(1000, false, creatureList).getName(), is("rat"));
    creatureList.add(SingletonRepository.getEntityManager().getCreature("balrog"));
    assertThat("rat and balrog in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));

  }
View Full Code Here

Examples of games.stendhal.server.maps.quests.DailyMonsterQuest.DailyQuestAction.pickIdealCreature()

    final LinkedList<Creature> creatureList = new LinkedList<Creature>();
    creatureList.add(SingletonRepository.getEntityManager().getCreature("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));
    assertThat("1 rat in list", dmqpick.pickIdealCreature(1000, false, creatureList).getName(), is("rat"));
    creatureList.add(SingletonRepository.getEntityManager().getCreature("balrog"));
    assertThat("rat and balrog in list", dmqpick.pickIdealCreature(-1, false, creatureList).getName(), is("rat"));

  }

  /**
   * Tests for pickIdealCreatureratLONGLIST.
View Full Code Here

Examples of games.stendhal.server.maps.quests.DailyMonsterQuest.DailyQuestAction.pickIdealCreature()

      creat.setLevel(i);
      creatureList.add(creat);
    }
    Collections.sort(creatureList, new LevelBasedComparator());
    for (int level = 0; level < 120; level++) {
      assertThat("1 rat in list", dmqpick.pickIdealCreature(level, false, creatureList).getLevel(),
          lessThanOrEqualTo(level + 5));
    }

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