Package vehicles

Examples of vehicles.RobberyCar


    police_cars.add(new PoliceCar());
   
    ordinary_cars = new ArrayList<OrdinaryCar>();
    ordinary_cars.add(new OrdinaryCar());
   
    robberyCar = new RobberyCar()
   
    //ADD VEHICLES TO ROUTES
    Logger.get().addOrdinaryMessage("[Map] Add a police car to a route!");
    routes.get(0).addVehicle(police_cars.get(0));
    Logger.get().addOrdinaryMessage("[Map] Add an ordinary car to a route!");
View Full Code Here


        // 8
        stopcross.get(0).addOutRoutes(routes.get(8));
        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
View Full Code Here

    entrypoints.get(0).addOutRoutes(routes.get(8));
    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);
View Full Code Here

    if(params.size() != 1){
      return MessageBox.get().getMessage(Messages.ParameterCountMismatch) + "\r\n";
    }
    String epId = params.get(0);
   
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    EntryPoint ep = ObjectStore.getInstance().getEntryPoint(epId);
   
    //check, hogy nem-e null
    if(ep == null){
      return MessageBox.get().getMessage(Messages.NotFound) + "\r\n";
View Full Code Here

  public String executeCommand(List<String> params) {
    if(params.size() != 0){
      return MessageBox.get().getMessage(Messages.ParameterCountMismatch);
    }
   
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    Cross rcross = rcar.getCross();

    ArrayList<Route> al_routes = new ArrayList<Route>();
   
    List<Route> inR = rcross.getInRoutes();
    al_routes.addAll(inR);
   
    List<Route> outR = rcross.getOutRoutes();
    al_routes.addAll(outR);
   
    Integer i = 1;
    StringBuilder sb = new StringBuilder();
    System.out.println("Ha a szamsorbol hianyzik egy, az azert van, mert azon az uton van(tehat pl.: 1 2 4 5).");
    sb.append("_____Rablo lehetseges kimeno utjai_____ \r\n");
    for(Route r : al_routes){
      if(r != rcar.getRoute()){
        sb.append((i++)+" ");
      }
      sb.append("\r\n");
    }
   
View Full Code Here

    if(params.size() != 1){
      return MessageBox.get().getMessage(Messages.ParameterCountMismatch);
    }
    String qpId = params.get(0);
   
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    QuitPoint qp = ObjectStore.getInstance().getQuitPoint(qpId);
   
    //check, hogy nem-e null
    if(qp == null){
      return MessageBox.get().getMessage(Messages.NotFound);
View Full Code Here

public class SetRobberyTurnBack extends AbstractCommand{

  @Override
  public String executeCommand(List<String> params) {
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    rcar.turn();
    String key = ObjectStore.getInstance().getRouteKey(rcar.getRoute());
    return "Sikeresen megfordult a rablo az uton(id: "+key+")!\r\n";
  }
View Full Code Here

        return MessageBox.get().getMessage(Messages.WrongParameter) + ("(Sebesseg: 0-90)\r\n");
      }
     
      //lekerjuk a szukseges objektumokat
      Route destRoute = ObjectStore.getInstance().getRoute(routeId);
      RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
      if(destRoute == null || rcar ==null){
        return MessageBox.get().getMessage(Messages.NotFound);
      }
     
      //beallitjuk az uj poziciora a rendorautot
      Route proute = rcar.getRoute();
      if(proute != null)
        proute.removeCarFromRoute(rcar);
      destRoute.addVehicle(rcar, routePos);
      rcar.setSpeed(speed);
     
      //turn it if necessary
      if(rcar.getTurned() != direction){
        rcar.turn();
      } else {
        //csak, hogy biztosan jo sebesseg meg ilyenek legyenek beallitva..
        //tudom elegge ocsmany megoldas..
        rcar.turn();
        rcar.turn();
      }
     
      return "Sikeresen beallitott rablo adatok!\r\n";
    } catch (NumberFormatException e){
      return "SetPoliceCarDetails - nem megfeleloen megadott 3.,4. vagy 5. parameter - nem szam!\r\n";
View Full Code Here

    if(params.size() != 1){
      return MessageBox.get().getMessage(Messages.ParameterCountMismatch) + "\r\n";
    }
   
   
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    HidingPlace hp = ObjectStore.getInstance().getHidingPlace();
   
    //check, hogy nem-e null
    if(hp == null){
      return MessageBox.get().getMessage(Messages.NotFound)+ "\r\n";
View Full Code Here

    //8
    stopcross.get(0).addOutRoutes(routes.get(8));
    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);
View Full Code Here

TOP

Related Classes of vehicles.RobberyCar

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.