Example #1
0
 /*
  * Add HolyHandGrenades to world
  */
 private void addHHG(World world) {
   for (int i = 0; i < INITIAL_HHG; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     HolyHandGrenade hhg = new HolyHandGrenade(loc);
     world.addItem(hhg);
     world.addActor(hhg);
   }
 }
Example #2
0
 /*
  * Add HolyHandGrenade Tanks to world
  */
 private void addHHGTank(World world) {
   for (int i = 0; i < INITIAL_HHGTANK; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     HolyGrenadeTank tank = new HolyGrenadeTank(loc);
     world.addItem(tank);
     world.addActor(tank);
   }
 }
Example #3
0
 /*
  * Add Mines to world
  */
 private void addMine(World world) {
   for (int i = 0; i < INITIAL_MINE; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Mine mine = new Mine(loc);
     world.addItem(mine);
     world.addActor(mine);
   }
 }
Example #4
0
 /*
  * Add Gnats to world
  */
 private void addGnats(World world) {
   for (int i = 0; i < INITIAL_GNATS; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Gnat gnat = new Gnat(loc);
     world.addItem(gnat);
     world.addActor(gnat);
   }
 }
Example #5
0
 /*
  * Add KillerRabbits to world
  */
 private void addKillerRabbits(World world) {
   KillerRabbitAI killerRabbitAI = new KillerRabbitAI();
   for (int i = 0; i < INITIAL_KILLER_RABBITS; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     KillerRabbit caerbonnog = new KillerRabbit(killerRabbitAI, loc);
     world.addItem(caerbonnog);
     world.addActor(caerbonnog);
   }
 }
Example #6
0
  /*
   * Add Bulldozers to world
   */
  private void addBulldozer(World world) {

    for (int i = 0; i < INITIAL_BULLDOZER; i++) {
      Location loc = Util.getRandomEmptyLocation(world);
      Bulldozer bulldozer = new Bulldozer(loc);
      world.addItem(bulldozer);
      world.addActor(bulldozer);
    }
  }
Example #7
0
  /*
   * Add Donald Trumps to world
   */
  private void addTrumps(World world) {

    for (int i = 0; i < INITIAL_TRUMPS; i++) {
      Location loc = Util.getRandomEmptyLocation(world);
      DonaldTrump trump = new DonaldTrump(loc);
      world.addItem(trump);
      world.addActor(trump);
    }
  }
Example #8
0
 /*
  * Add Sniper to world
  */
 private void addSniper(World world) {
   SniperAI sniperAI = new SniperAI();
   for (int i = 0; i < INITIAL_SNIPERS; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Sniper sniper = new Sniper(sniperAI, loc);
     world.addItem(sniper);
     world.addActor(sniper);
   }
 }
Example #9
0
 /*
  * Add Knights to world
  */
 private void addKnights(World world) {
   KnightAI knightAI = new KnightAI();
   for (int i = 0; i < INITIAL_KNIGHTS; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Knight knight = new Knight(knightAI, loc);
     world.addItem(knight);
     world.addActor(knight);
   }
 }
Example #10
0
 /*
  * Add Rabbits to world
  */
 private void addRabbits(World world) {
   RabbitAI rabbitAI = new RabbitAI();
   for (int i = 0; i < INITIAL_RABBITS; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Rabbit rabbit = new Rabbit(rabbitAI, loc);
     world.addItem(rabbit);
     world.addActor(rabbit);
   }
 }
Example #11
0
 /*
  * Add Foxes to world
  */
 private void addFoxes(World world) {
   FoxAI foxAI = new FoxAI();
   for (int i = 0; i < INITIAL_FOXES; i++) {
     Location loc = Util.getRandomEmptyLocation(world);
     Fox fox = new Fox(foxAI, loc);
     world.addItem(fox);
     world.addActor(fox);
   }
 }
Example #12
0
  /**
   * Initializes animals, vehicles, and items to world
   *
   * @param world world where animals, vehicles, and items are initialized
   */
  public void initialize(World world) {
    addGrass(world);
    world.addActor(new Gardener());

    addGnats(world);
    addRabbits(world);
    addFoxes(world);

    addSniper(world);
    addHHGTank(world);
    addKnights(world);
    addTrumps(world);
    addBulldozer(world);

    addKillerRabbits(world);
    addHHG(world);
    addMine(world);
    addWall(world);

    // TODO: You may add your own creatures here!
  }