Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- BugRunner4c.java MrG 2012.0403
- purpose: test out the gridworld env
- required files: ./BugRunner4c.java
- ../../gridworld.jar
- translator phase: javac -classpath .:../../gridworld.jar BugRunner4c.java
- interpreter phase: java -classpath .:../../gridworld.jar BugRunner4c
- */
- //imported classes
- import info.gridworld.actor.ActorWorld;
- import info.gridworld.actor.Bug;
- import info.gridworld.actor.Rock;
- import info.gridworld.grid.Location;
- import info.gridworld.grid.Grid;
- //main class
- public class BugRunner4c
- {
- public static void main(String[] args)
- {
- ActorWorld world = new ActorWorld();
- Bug b = new Bug();
- world.add(b);
- Grid g = b.getGrid();
- b.removeSelfFromGrid();
- b.putSelfInGrid(g, new Location(5,5));
- world.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement