Advertisement
calcpage

p23BugRunner4c.java

Apr 16th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.78 KB | None | 0 0
  1. /*
  2. BugRunner4c.java        MrG     2012.0403
  3. purpose:        test out the gridworld env
  4. required files:     ./BugRunner4c.java
  5.             ../../gridworld.jar
  6. translator phase:   javac -classpath .:../../gridworld.jar BugRunner4c.java
  7. interpreter phase:  java -classpath .:../../gridworld.jar BugRunner4c
  8. */
  9.  
  10. //imported classes
  11. import info.gridworld.actor.ActorWorld;
  12. import info.gridworld.actor.Bug;
  13. import info.gridworld.actor.Rock;
  14.  
  15. import info.gridworld.grid.Location;
  16. import info.gridworld.grid.Grid;
  17.  
  18. //main class
  19. public class BugRunner4c
  20. {
  21.     public static void main(String[] args)
  22.     {
  23.         ActorWorld world = new ActorWorld();
  24.         Bug b = new Bug();
  25.     world.add(b);
  26.     Grid g = b.getGrid();
  27.     b.removeSelfFromGrid();
  28.     b.putSelfInGrid(g, new Location(5,5));
  29.         world.show();
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement