This commit is contained in:
Ninja-Jambon 2024-03-27 11:54:38 +01:00
parent b05b7cd13c
commit 29ce62150e
10 changed files with 153 additions and 37 deletions

View file

@ -10,7 +10,9 @@ import java.util.stream.Stream;
import java.util.stream.Collectors;
import userInterface.UserInterface;
import universe.*;
import universe.Universe;
import universe.Stack;
import universe.Situation;
public class AppLaser {
public static void main(String [] args) {
@ -46,12 +48,11 @@ public class AppLaser {
else if (start_dir == 12) firstState_j = start_j + 1;
else if (start_dir == 13) firstState_j = start_j - 1;
Stack <Situation> stack = new Stack <Situation>();
Universe universe = new Universe(universe_width + 2, universe_height + 2, start_i + 1, start_j + 1, start_dir);
Situation currentState = new Situation(firstState_i + 1, firstState_j + 1, start_dir, 0);
if (cli == true) {
Stack <Situation> stack = new Stack <Situation>();
Universe universe = new Universe(universe_width + 2, universe_height + 2, start_i + 1, start_j + 1, start_dir);
Situation currentState = new Situation(firstState_i + 1, firstState_j + 1, start_dir, 0);
Scanner scanner = new Scanner(System.in);
int choice;
@ -315,7 +316,7 @@ public class AppLaser {
} while (choice != 0);
}
else {
UserInterface userInterface= new UserInterface();
UserInterface userInterface = new UserInterface(universe);
userInterface.start();
}
}