Package cross

Examples of cross.Cross


    String crossId = params.get(1);
   
   
   
    Vehicle car = ObjectStore.getInstance().getVehicle(carId);
    Cross cross = ObjectStore.getInstance().getCross(crossId);
   
    //eltavolitjuk az utrol
    car.getRoute().removeCarFromRoute(car);
   
    //hozzaadjuk a crosshoz
    cross.addVehicleToCross(car);
   
    //itt mar a tobbit intezi az addVehivleToCross...
   
    return "Sikeresen hozza lett adva a [" + carId + "] auto a [" + crossId + "] uthoz! \r\n";
  }
View Full Code Here


    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).");
View Full Code Here

      return MessageBox.get().getMessage(Messages.ParameterCountMismatch);
    }
    String result = "";
    String crossId = params.get(0);
   
    Cross c = ObjectStore.getInstance().getCross(crossId);
    if(c == null){
      return MessageBox.get().getMessage(Messages.NotFound);
    }
   
    Vehicle v = c.getVehicleFromCross();
    if(v == null){
      return MessageBox.get().getMessage(Messages.EmptyCross);
    }
   
    String vId = "";
View Full Code Here

   */
  public void calcGraphics(){
    MainGraphics gr = Game.getInstance().getMap().getGraphics();
   
    // lekerjuk a ket csomopont koordinatait
    Cross cr1 = r.getStartCross();
    Point cr1p = gr.getGraphicsFromObject(cr1).getPosition();
    Cross cr2 = r.getEndCross();
    Point cr2p = gr.getGraphicsFromObject(cr2).getPosition();
   
    // beallitjuk az eretkeket
    xstart = cr1p.x;
    ystart = cr1p.y;
View Full Code Here

   
    //meghatarozzuk a bunny poziciojat a terkepen
    Route r = Bunny.get().getRoute();
   
    // lekerjuk a ket csomopont koordinatait
    Cross cr1 = r.getStartCross();
    Point cr1p = gr.getGraphicsFromObject(cr1).getPosition();
    Cross cr2 = r.getEndCross();
    Point cr2p = gr.getGraphicsFromObject(cr2).getPosition();
   
    //kiszamoljuk a bunny konkret megjeleniteshez hasznalt koordinatajat
    xp = (cr2p.x-cr1p.x)*Bunny.get().getPos()/r.getLength()+cr1p.x;   
    yp = (cr2p.y-cr1p.y)*Bunny.get().getPos()/r.getLength()+cr1p.y;
 
View Full Code Here

    Route r = ord.getRoute();
    // ha uton vagyunk es nem keresztezodesben
    if (r!=null){
   
    // az adott ut ket csomopontjanak koordinatainak lekerdezese 
    Cross cr1 = r.getStartCross();
    Point cr1p = gr.getGraphicsFromObject(cr1).getPosition();
    Cross cr2 = r.getEndCross();
    Point cr2p = gr.getGraphicsFromObject(cr2).getPosition();
   
    // konkret pozicio kiszamolasa
    xp = (cr2p.x-cr1p.x)*ord.getPosition()/r.getLength()+cr1p.x;   
    yp = (cr2p.y-cr1p.y)*ord.getPosition()/r.getLength()+cr1p.y;
 
View Full Code Here

   
    // stoptabla helye megnezzuk az elso bemeno utat:
    Route r = cr.getInRoutes().get(1);
   
    //megnezzuk a ket csomopontjat a kijelolt utnak
    Cross cr1 = r.getStartCross();
    Point cr1p = gr.getGraphicsFromObject(cr1).getPosition();
    Cross cr2 = r.getEndCross();
    Point cr2p = gr.getGraphicsFromObject(cr2).getPosition();
   
    // a tavolsag tizedenel helyezzuk el a tablat
    Point pos = new Point(cr2p.x+(cr1p.x-cr2p.x)/10,cr2p.y+(cr1p.y-cr2p.y)/10);
   
View Full Code Here

    }
   
    Integer selectedRoute = Integer.parseInt(params.get(0));
   
    RobberyCar rcar = ObjectStore.getInstance().getRobberyCar();
    Cross rcross = rcar.getCross();

    //hozzunk letre egy kozos listat
    ArrayList<Route> al_routes = new ArrayList<Route>();
   
    //bejovo
    List<Route> inR = rcross.getInRoutes();
    al_routes.addAll(inR);
   
    //kimeno
    List<Route> outR = rcross.getOutRoutes();
    al_routes.addAll(outR);
   
    //ha olyan szamot kaptunk ami nagyobb a tombtol
    if(selectedRoute > al_routes.size() || selectedRoute < 0){
      return MessageBox.get().getMessage(Messages.WrongParameter) + "\r\n";
View Full Code Here

TOP

Related Classes of cross.Cross

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.