Pr_robot_factory/ui/UI.java

36 lines
653 B
Java
Raw Normal View History

2022-12-08 14:58:44 +01:00
package ui;
import facade.Factory;
import infrastructure.Persistenz;
import java.util.Scanner;
2022-12-08 14:58:44 +01:00
public class UI {
2022-12-14 09:54:18 +01:00
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();
}
}
2022-12-14 09:54:18 +01:00
public void hauptmenü(){
2022-12-14 09:54:18 +01:00
}
2022-12-08 14:58:44 +01:00
}