36 lines
653 B
Java
36 lines
653 B
Java
package ui;
|
|
|
|
import facade.Factory;
|
|
import infrastructure.Persistenz;
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class UI {
|
|
|
|
private Factory factory;
|
|
private String name;
|
|
|
|
Scanner sc = new Scanner(System.in);
|
|
public UI (Factory factory){
|
|
this.factory = factory;
|
|
hauptmenü();
|
|
|
|
}
|
|
public UI (String name){
|
|
this.name = name;
|
|
if(Persistenz.existsSavedData(name)){
|
|
try{
|
|
this.factory = (Factory) Persistenz.loadFactoryData(name);
|
|
}catch(Exception e){
|
|
|
|
}
|
|
}else{
|
|
this.factory = new Factory();
|
|
}
|
|
}
|
|
|
|
public void hauptmenü(){
|
|
|
|
}
|
|
}
|