src/main/java/tsz/game/model/GameWindow.java
/**
	 * Generates a new car.
	 * @param obstacleCars - this method add the new car to this list of obstacle cars.
	 * @param position - the position of the new car.
	 */
Generates a new car.
@param obstacleCars - this method add the new car to this list of obstacle cars.
@param position - the position of the new car.
Generates a new car . @param obstacleCars - this method add the new car to this list of obstacle cars . @param position - the position of the new car .
public void generatingCars(List<Car> obstacleCars, int position) {
		GameView view = new GameView();
		Car c = new Car((position+0.1)*view.getLaneWidth(),-100);
        int color = new Random().nextInt(5);
        c.setColor(Integer.toString(color));
        obstacleCars.add(c);
	}
public void generatingCars ( List < Car > obstacleCars , int position ) { GameView view = new GameView ( ) ; Car c = new Car ( ( position + 0.1 ) * view . getLaneWidth ( ) , - 100 ) ; int color = new Random ( ) . nextInt ( 5 ) ; c . setColor ( Integer . toString ( color ) ) ; obstacleCars . add ( c ) ; }
Generates a new car.
Generates a new car .