package game;

import game.exceptions.GameModNotFoundException;

import java.util.ArrayList;
import java.util.List;

public class Game {
    private static AbstractVehicleFactory factory;
    
    public static void main(String[] args) throws GameModNotFoundException {
        factory = VehicleFactoryFactory.createVehicleFactory();

        createVehicle(Terrain.ROAD);
        createVehicle(Terrain.OFFROAD);
        createVehicle(Terrain.SKY);
        createVehicle(Terrain.SPACE);
        createVehicle(Terrain.TRANSDIMENSIONAL);
    }
    
    private static void createVehicle(Terrain terrain) throws GameModNotFoundException {
        Vehicle vehicle = factory.createVehicle(terrain);
        if(vehicle == null) {
            System.out.println("For the terrain " + terrain.toString() + " is no vehicle available");
        } else{
            System.out.println("Vehicle " + vehicle.getName() + " was created in terrain " + terrain.toString());
        }
    }
}

@@ -275,262 +275,775 @@
     
-factory = VehicleFactoryFactory.createVehicleFactory();%0A%0A        createVehicle(Terrain.ROAD);%0A        createVehicle(Terrain.OFFROAD);%0A        createVehicle(Terrain.SKY);%0A        createVehicle(Terrain.SPACE);%0A        createVehicle(Terrain.TRANSDIMENSIONAL
+System.out.println(%22%5Cn%5Cn               DHBW SanPatrick               %5Cn%22);%0A        String output = String.format(%22%7C%25045d%7C%5Cn%7C        Terrain       %7C        Vehicle       %7C%22, 0).replace('0', '-');%0A%0A        System.out.println(output);%0A%0A%0A%0A        factory = VehicleFactoryFactory.createVehicleFactory();%0A%0A        createVehicle(Terrain.ROAD);%0A        createVehicle(Terrain.OFFROAD);%0A        createVehicle(Terrain.WATER);%0A        createVehicle(Terrain.INDUSTRIAL);%0A        createVehicle(Terrain.SKY);%0A        createVehicle(Terrain.SPACE);%0A        createVehicle(Terrain.UNDERGROUND);%0A        createVehicle(Terrain.UNDERWATER);%0A        createVehicle(Terrain.TRANSDIMENSIONAL);%0A%0A%0A%0A        output = String.format(%22%7C%25045d%7C%22,0).replace('0', '-');%0A        System.out.println(output
 );%0A 
@@ -1199,16 +1199,44 @@
 rrain);%0A
+        String vehicleName;%0A
         
@@ -1273,74 +1273,23 @@
     
-System.out.println(%22For the terrain %22 + terrain.toString() + %22 is 
+vehicleName = %22
 no v
@@ -1305,17 +1305,16 @@
 ailable%22
-)
 ;%0A      
@@ -1339,118 +1339,184 @@
     
-System.out.println(%22Vehicle %22 + vehicle.getName() + %22 was created in terrain %22 + terrain.toString()
+vehicleName = vehicle.getName();%0A        %7D%0A%0A        String output = String.format(%22%7C%25045d%7C%5Cn%7C %25-20s %7C %25-20s %7C%22, 0, terrain.toString(), vehicleName).replace('0', '-'
 );%0A
+%0A
         
 %7D%0A  
@@ -1507,22 +1507,48 @@
 );%0A%0A        
-%7D
+System.out.println(output);
 %0A    %7D%0A%7D%0A

Update output