Package wolf.city.road.rules

Examples of wolf.city.road.rules.Basic


          //yes, have an intersection! Free, with your purchase!
          rq.add(localConstraints(rampRule.globalGoals(city, road, Direction.LEFT)));
          rq.add(localConstraints(rampRule.globalGoals(city, road, Direction.RIGHT)));
        }
        if(road.getType() == RoadType.HIGHWAY){
          Basic basicRule = new Basic(city);
          Road newRoad = basicRule.globalGoals(city, road, Direction.FORWARD);
          rqH.add(localConstraints(newRoad));
        }else{
          rqM.add(road);
        }
       
View Full Code Here


    return road;
  }


  private void seedRoadMap(RoadQueue roadQueue) {
    Basic basicRule = new Basic(city);
    //seed at center (not such a great thing)
    if(seedAtCenter){
      float x, y;
      while(true){ //keep these variables in check
        x = (float) ((this.city.random.nextFloat()-.5)*city.sizeX); //can place in center half of city
View Full Code Here

    switch(type){
    case STREET:
      rule = new Grid(rule.getCity());
      break;
    case MAIN:
      rule = new Basic(rule.getCity());
//        public float turnRateForward = 40;
//      };
    case HIGHWAY:
      rule = new Basic(rule.getCity());
    case BRIDGE:
      rule = new Basic(rule.getCity());
      break;
    case DEFAULT:
      rule = new Basic(rule.getCity());
      break;
    default:
      rule = new Basic(rule.getCity());
      break;
    }
  }
View Full Code Here

TOP

Related Classes of wolf.city.road.rules.Basic

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.