package h05;

/**
 * Main entry point in executing the program.
 */
public class Main {
    /**
     * Main entry point in executing the program.
     *
     * @param args program arguments, currently ignored
     */
    public static void main(String[] args) {
        // TODO: H5.6
        Airspace.get().scanAirspace();

        var longRunway = new Runway(4000);

        var shortRunway = new Runway(2000);

        var balloon = new WeatherBalloon(99);
        balloon.start();

        var tankA = new Tank(FuelType.JetA);

        var tankB = new Tank(FuelType.JetB);

        var tankerPlane = new TankerPlane("D-ABCD", 10000, FuelType.JetA, 1000);
        tankerPlane.loadFuel(FuelType.AvGas, 100000);
        tankerPlane.takeOff();

        var passangerPlane = new PassengerPlane("GAG-67", 10000, FuelType.JetA, 1700, 5);
        tankA.refuelPlane(passangerPlane);
        passangerPlane.board(100);
        passangerPlane.takeOff();

        Airspace.get().scanAirspace();

        var cargoPlane = new CargoPlane("D-AFFF", 8000, FuelType.JetB, 1500);
        cargoPlane.loadContainer(1000);
        tankB.refuelPlane(cargoPlane);

        var combinedPlane = new CombinedPlane("D-ABBB", 9000, FuelType.AvGas, 10700, 5);
        tankerPlane.refuelPlane(combinedPlane);
        combinedPlane.board(30);
        combinedPlane.loadContainer(400);
        combinedPlane.takeOff();
        combinedPlane.fly(3000);

        Airspace.get().scanAirspace();

        shortRunway.land(combinedPlane);
        longRunway.land(cargoPlane);

        Airspace.get().scanAirspace();

        balloon.pop();

        Airspace.get().scanAirspace();
    }
}
