Example #1
0
  public SimulationTest setRole(Role role, String... players) {
    GameStage stage = (GameStage) bot.getStage();

    for (String s : players) {
      Player player = stage.getPlayer(s);
      player.setRole(AbstractRole.create(role, player));
      player.getRole().setStage(stage);
    }

    return this;
  }
Example #2
0
 protected void checkForMessage(String s) {
   if (!bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) {
     throw new RuntimeException("Could not find message in the log: " + s);
   }
 }
Example #3
0
 protected void checkForAbsence(String s) {
   if (bot.getMessageLog().toString().toLowerCase().contains(s.toLowerCase())) {
     throw new RuntimeException("Found message that shouldn't exist: " + s);
   }
 }