public Car() { Length = DEFAULT_LENGTH; Width = DEFAULT_WIDTH; Acceleration = DEFAULT_ACC; Decceleration = DEFAULT_DEC; Speed = 0; CurrentRoad = new Road(); CarId = new CarId(); Position = new Position(0, Lane.Left); }
public Car( Road road, Position position, Position destination, int length = DEFAULT_LENGTH, int width = DEFAULT_WIDTH, int acc = DEFAULT_ACC, int dec = DEFAULT_DEC, int speed = 0) { Length = length; Width = width; Acceleration = acc; Decceleration = dec; Speed = speed; CarId = new CarId(); CurrentRoad = road; CurrentRoad.AddCar(this); Destination = destination; Position = position; }