Package vehicles

Examples of vehicles.PoliceCar


 
    //CREATE VEHICLES
    vehicles = new ArrayList<Vehicle>();
   
    police_cars = new ArrayList<PoliceCar>();
    police_cars.add(new PoliceCar());
   
    ordinary_cars = new ArrayList<OrdinaryCar>();
    ordinary_cars.add(new OrdinaryCar());
   
    robberyCar = new RobberyCar()
View Full Code Here


        bank.setSecondaryRoute(routes.get(8));
   
        // AUTOK LETREHOZASA
        robberyCar = new RobberyCar(bank, 100);
   
        PoliceCar pc1 = new PoliceCar(70);
        police_cars.add(pc1);
   
        // police car grafikus hasznalata
        DrawPoliceCar pold = new DrawPoliceCar();
        GraphicsPoliceCar poldg = new GraphicsPoliceCar();
View Full Code Here

   
   
    //AUTOK LETREHOZASA
    robberyCar = new RobberyCar(bank, 100);
   
    PoliceCar pc1 = new PoliceCar(70);
    police_cars.add(pc1);
   
    OrdinaryCar ordc1 = new OrdinaryCar(40);
    ordinary_cars.add(ordc1);
   
View Full Code Here

        return MessageBox.get().getMessage(Messages.WrongParameter) + ("(Sebesseg: 0-100)\r\n");
      }
     
      //lekerjuk a szukseges objektumokat
      Route destRoute = ObjectStore.getInstance().getRoute(routeId);
      PoliceCar pcar = ObjectStore.getInstance().getPoliceCar(policeId);
      if(destRoute == null || pcar ==null){
        return MessageBox.get().getMessage(Messages.NotFound);
      }
     
      //beallitjuk az uj poziciora a rendorautot
      Route proute = pcar.getRoute();
      proute.removeCarFromRoute(pcar);
      destRoute.addVehicle(pcar, routePos);
      pcar.setSpeed(speed);
     
      return "Sikeresen beallitott rendorauto adatok!\r\n";
    } catch (NumberFormatException e){
      return "SetPoliceCarDetails - nem megfeleloen megadott 3. vagy 4. parameter - nem szam!\r\n";
    }
View Full Code Here

      String pId = params.get(0);
      String rId = params.get(1);
      int rPos = Integer.parseInt(params.get(2));
     
      //a parameterek alapjan lekerdezzuk az adott objektumokat
      PoliceCar pcar = ObjectStore.getInstance().getPoliceCar(pId);
      Route proute = pcar.getRoute();
      Route route = ObjectStore.getInstance().getRoute(rId);
     
      //ha valamelyiket nem talaltuk..
      if(route == null || pcar == null){
        return MessageBox.get().getMessage(Messages.NotFound);
View Full Code Here

    bank.addInRoutes(routes.get(8));
   
    //AUTOK LETREHOZASA
    robberyCar = new RobberyCar(bank, 100);
   
    PoliceCar pc1 = new PoliceCar(70);
    police_cars.add(pc1);
   
    OrdinaryCar ordc1 = new OrdinaryCar(40);
    ordinary_cars.add(ordc1);
   
View Full Code Here

   
   
    //AUTOK LETREHOZASA
    robberyCar = new RobberyCar(bank, 100);
   
    PoliceCar pc1 = new PoliceCar(70);
    police_cars.add(pc1);
   
    OrdinaryCar ordc1 = new OrdinaryCar(40);
    ordinary_cars.add(ordc1);
   
View Full Code Here

    }
    String policeCarId = params.get(0);
   
    StringBuilder resultString = new StringBuilder();
   
    PoliceCar pcar = ObjectStore.getInstance().getPoliceCar(policeCarId);
   
    //terjunk vissza errorral, hogyha nem talaljuk az autot
    if(pcar == null){
      return MessageBox.get().getMessage(Messages.NotFound);
    }
   
    //osszepakoljuk az eredmenyt
    String routeId = ObjectStore.getInstance().getRouteKey(pcar.getRoute());
    String crossId = ObjectStore.getInstance().getCrossKey(pcar.getCross());
    resultString.append("____PoliceCar: " + policeCarId + "____\r\n");
    resultString.append("Aktualis sebesseg: " + pcar.getCurrentSpeed() + "\r\n");
    resultString.append("Eredeti sebesseg: " + pcar.getSpeed() + "\r\n");
    resultString.append("Pozicioja az uton: " + pcar.getPosition() + "\r\n");
    resultString.append("Az ut id-je amin van: " + routeId + "\r\n");
    resultString.append("Az keresztezodes id-je ami fele hala: " + crossId + "\r\n");
   
    return resultString.toString();
  }
View Full Code Here

    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    int pos = rcar.getPosition();
    Route rroute = rcar.getRoute();
   
    //lekerdezzuk a rendorautot, illetve megvizsgaljuk egyaltalan letezik-e ilyen.
    PoliceCar pcar = ObjectStore.getInstance().getPoliceCar(pid);
    Route proute = pcar.getRoute();
    if(pcar == null){
      return MessageBox.get().getMessage(Messages.NotFound);
    }
    if(rroute == null){
      return MessageBox.get().getMessage(Messages.NotFound) + "(meg nem lepett ra utra(route == null))\r\n";
View Full Code Here

TOP

Related Classes of vehicles.PoliceCar

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.