Advertisement
cgorrillaha

FlexTest

Mar 26th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. package tests;
  2.  
  3. import controllers.GUIControl;
  4. import model.*;
  5. import view.GUIPanel;
  6. import view.MapPanel;
  7. import view.ViewFrame;
  8.  
  9. import java.util.ArrayList;
  10. import java.util.InputMismatchException;
  11.  
  12. public class FlexTest {
  13.     public static void main(String[] args) {
  14.         ArrayList<Entity> bots=new ArrayList<>();
  15.         bots.add(new FlexibleBot(new Location(0,0), 25, Movable.Directions.RIGHT, Bot.FAST_SPEED));
  16.         bots.add(new FlexibleBot(new Location(0,5), 32, Movable.Directions.LEFT, Bot.SLOW_SPEED));
  17.         bots.add(new FlexibleBot(new Location(0,2), 45, Movable.Directions.DOWN, Bot.SLOW_SPEED));
  18.  
  19.         Map map=new Map(bots);
  20.  
  21.         map.printMap();
  22.  
  23.         System.out.println("+++++++++++++++++++++");
  24.  
  25.         Bot b=map.removeBotFromMap((Bot)bots.get(0));
  26.  
  27.         map.printMap();
  28.  
  29.         map.putBotOnMap(b);
  30.  
  31.         System.out.println("+++++++++++++++++++++");
  32.         map.printMap();
  33.  
  34.         ((FlexibleBot) bots.get(0)).move(map);
  35.         map.updateMap();
  36.  
  37.         System.out.println("+++++++++++++++++++++");
  38.         map.printMap();
  39.         }
  40.  
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement