Guest User

Untitled

a guest
Dec 11th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import de.ur.mi.graphicsapp.GraphicsApp;
  2. import simulator.ColonySimulator;
  3. import world.ColonyView;
  4.  
  5. public class AntColony extends GraphicsApp {
  6. private static final int WIDTH = 300;
  7. private static final int HEIGHT = 300;
  8. private ColonySimulator simulator;
  9. private ColonyView view;
  10.  
  11. public void setup() {
  12. size(WIDTH, HEIGHT);
  13. simulator = new ColonySimulator(WIDTH, HEIGHT);
  14. view = new ColonyView();
  15. simulator.addObserver(view);
  16. simulator.start();
  17. }
  18.  
  19. public void draw() {
  20. simulator.tick();
  21. }
  22. }
Add Comment
Please, Sign In to add comment