2009 Stockpile Critter
<< 2009NumberCube | APQuestionsTrailIndex | 2009BatteryCharger >>
I made a 48 x 48 gif file which can be downloaded and placed in the same folder as your class files.
StockpileCritter.java
import info.gridworld.actor.*; import info.gridworld.grid.*; import java.util.ArrayList; /** * @version 11 May 2009 */ public class StockpileCritter extends Critter { }
StockpileCritterRunner
import info.gridworld.actor.*; import info.gridworld.grid.*; import java.awt.Color; public class StockPileCritterRunner { public static void main(String[] args) { ActorWorld world = new ActorWorld(); world.add(new Location(0, 1), new Rock()); world.add(new Location(1, 3), new Rock()); world.add(new Location(2, 1), new Flower(Color.BLUE)); world.add(new Location(2, 2), new StockpileCritter()); world.add(new Location(2, 3), new Rock()); world.add(new Location(5, 3), new Flower(Color.RED)); world.show(); } }