Fixed Task 5 part 2 (Current Arrangement State)

This commit is contained in:
Immanuel Alvaro Bhirawa 2023-03-24 14:53:07 +11:00
parent 9e33b57ce7
commit 1f0df80121

View File

@ -126,7 +126,7 @@ public class Viewer extends Application {
// To group the root and adjust their Px sizes accordingly // To group the root and adjust their Px sizes accordingly
// to each other // to each other
StackPane rootGroup = new StackPane(); // StackPane rootGroup = new StackPane();
// Part 1 done (Game Arrangement State) // Part 1 done (Game Arrangement State)
String[] parts = stateString.split(";"); String[] parts = stateString.split(";");
@ -152,9 +152,11 @@ public class Viewer extends Application {
switch(currentArrangementPhaseParts) { switch(currentArrangementPhaseParts) {
case "E": { case "E": {
currentArrangementActualPhase = "Exploration"; currentArrangementActualPhase = "Exploration";
break;
} }
case "S": { case "S": {
currentArrangementActualPhase = "Settler"; currentArrangementActualPhase = "Settler";
break;
} }
} }
@ -170,7 +172,7 @@ public class Viewer extends Application {
root.getChildren().add(currentStateText); root.getChildren().add(currentStateText);
currentStateText.setFill(Color.GREEN); currentStateText.setFill(Color.GREEN);
rootGroup.getChildren().addAll(currentStateText,board); // rootGroup.getChildren().addAll(currentStateText,board);
//Before doing part 3, make the board and the current state adjustable to each //Before doing part 3, make the board and the current state adjustable to each
// by that I mean, when the board size adjusted, the current state is also // by that I mean, when the board size adjusted, the current state is also