Package route

Examples of route.Route


   
    double routesSize = routes.size();
   
    //select a random route
    int selectedRoute = (int)(routesSize * rand);
    Route route = routes.get(selectedRoute);
   
    //select a random position
    double length = route.getLength();
    int randomPos = (int)(length * generator.nextDouble());
   
    //beallitjuk az uj ertekeket
    this.route = route;
    this.position = randomPos;
   
    route.setBunny(this);
  }
View Full Code Here


      Logger.get().addOrdinaryMessage("[Map letrehozasa]");
      m= new Map();
      Game.getInstance().setMap(m); // be�ll�tjuk, hogy a Game-t�l k�rhess�k k�s�bb le ezt a map-et
     
      Logger.get().addOrdinaryMessage("[Bemeno utak letrehozasa a rejtekhelyhez]");     
      Route inRoute = new Route();
     
      Logger.get().addOrdinaryMessage("[A bankrablok autoja erjen a kilepesi ponthoz?(i/n)]");
      boolean isRobberyCar = false;
      boolean goForward = false;
     
      String input = in.readLine()
     
      while(!goForward){
       
     
      if(input.equals("i")){
        isRobberyCar = true;
        goForward = true;
      } else if(input.equals("n")){
        isRobberyCar = false;
        goForward = true;
      } else {
        System.out.println("Ez nem opcio...");
      }
      }
     
      Vehicle vehicle;
     
      if (isRobberyCar)
      {
        vehicle = new RobberyCar();
        inRoute.addVehicle(vehicle);
       
      }
      else
      {
        vehicle = new OrdinaryCar();
        inRoute.addVehicle(vehicle)
      }
       
      Logger.get().addOrdinaryMessage("[Bemeno utak hozzaadasa...]");
      quitPoint.addInRoutes(inRoute);
      Logger.get().addOrdinaryMessage("[Kimeno utak hozzaadasa...]");
      quitPoint.addOutRoutes(new Route());
     
     
     
      Logger.get().addOrdinaryMessage("[Entry Point letrehozasa es hozzaadasa a maphez]");
      EntryPoint e = new EntryPoint();
      m.addEntryPoint(e);
     
      Logger.get().addOrdinaryMessage("[Kimeno utak hozzaadasa az Entry Pointhoz]");
      e.addOutRoutes(new Route());
     
     
      Logger.get().addOrdinaryMessage("[[[Kiindulohelyzet kialakitasa VEGE]]]");
      Logger.get().addOrdinaryMessage("[QuitPoint.updateVehicleAtCross meghivasa...]");
      quitPoint.updateVehiclesAtCross();
View Full Code Here

    clearScreen();
    Logger.get().addOrdinaryMessage("___________JARMU ATHALAD A KERESZTEZODESEN___________");
    GameTimer.setNotifyEnabled(false);//turn off time.
    Logger.get().addOrdinaryMessage("[[[Kiindulohelyzet kialakitasa]]]");
    Logger.get().addOrdinaryMessage("[Bemeno utak letrehozasa, illetve auto hozzaadasa...]");
    Route inRoute = new Route();
    OrdinaryCar ord_car = new OrdinaryCar();
    inRoute.addVehicle(ord_car);   
    Logger.get().addOrdinaryMessage("[Bemeno utak hozzaadasa...]");
    cross.addInRoutes(inRoute);
    Logger.get().addOrdinaryMessage("[Kimeno utak hozzaadasa...]");
    cross.addOutRoutes(new Route());
    Logger.get().addOrdinaryMessage("[[[Kiindulohelyzet kialakitasa VEGE]]]");
    Logger.get().addOrdinaryMessage("[Cross.updateVehicleAtCross meghivasa...]");
    cross.updateVehiclesAtCross();
    Logger.get().finishLogging();
    returnToMainMenu();
View Full Code Here

 
  public Bankrablo_utkozik_uton(){
    Logger.get().addOrdinaryMessage("_____________________________A bankrablo utkozik az uton_____________________________");
    Logger.get().addOrdinaryMessage("[[[ELOFELTETELEK LETREHOZASA]]]");
    GameTimer.setNotifyEnabled(false); // turn off the timer notifyObservers() method...
    route = new Route();
    robberyCar = new RobberyCar();
    ordinaryCar = new OrdinaryCar();
    game = new Game();
   
    Logger.get().addOrdinaryMessage("[Rablo hozzaadasa az uthoz...]");
View Full Code Here

   *
   * az entrypointban l�v� aut�t kil�pteti
   */
  public void vehicleOut() {
    Logger.get().addMethodCall("", "EntryPoint", "vehicleOut");
    Route selectedOutRoute = vehicleInCross.get(0).selectRoute(outroutes);
    selectedOutRoute.addVehicle(vehicleInCross.get(0));
    Logger.get().addMethodReturn("", "EntryPoint", "vehicleOut");
  }
View Full Code Here

   *
   * a keresztez�d�sben l�v� aut�t kil�pteti
   */
  public void vehicleOut() {
    Logger.get().addMethodCall("", "QuitPoint", "vehicleOut");
    Route selectedOutRoute = vehicleInCross.get(0).selectRoute(outroutes);
    selectedOutRoute.addVehicle(vehicleInCross.get(0));
    Logger.get().addMethodReturn("", "QuitPoint", "vehicleOut");
  }
View Full Code Here

   * a rejtekhelyb�l l�v� aut�t kil�pteti
   */
 
  public void vehicleOut() {
    Logger.get().addMethodCall("", "HidingPlace", "vehicleOut");
    Route selectedOutRoute = vehicleInCross.get(0).selectRoute(outroutes);
    selectedOutRoute.addVehicle(vehicleInCross.get(0));
    Logger.get().addMethodReturn("", "HidingPlace", "vehicleOut");
  }
View Full Code Here

   *
   * a keresztez�d�sben l�v� aut�t kil�pteti
   */
  public void vehicleOut() {
    Logger.get().addMethodCall("", "Cross", "vehicleOut");
    Route selectedOutRoute = vehicleInCross.get(0).selectRoute(outroutes);
    selectedOutRoute.addVehicle(vehicleInCross.get(0));
    Logger.get().addMethodReturn("", "Cross", "vehicleOut");
  }
View Full Code Here

TOP

Related Classes of route.Route

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.