Skip to content

Commit

Permalink
refactor: Apply SceneFactory wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelsa committed May 25, 2026
1 parent d7d92fd commit e153764
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void initializeGame() {

boolean loadResult = SessionManager.loadSession(model.getName().get());
if (loadResult) {
SceneManager.switchTo(SceneFactory.createExchangeView(true));
SceneManager.switchTo(SceneFactory.createExchangeView());
return;
} else {
model.isNewGame().set(true);
Expand Down Expand Up @@ -130,7 +130,7 @@ public void initializeGame() {
Exchange exchange = new Exchange(player.getName(), stocks);
SessionManager.newSession(player, exchange);
SessionManager.saveSession();
SceneManager.switchTo(SceneFactory.createExchangeView(true));
SceneManager.switchTo(SceneFactory.createExchangeView());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Parent createContent() {
public Parent createNavigation() {
return UIFactory.createNavigation(" Newspaper",
List.of("Home"),
() -> SceneManager.switchTo(SceneFactory.createExchangeView(false)));
() -> SceneManager.switchTo(SceneFactory.createExchangeView(true)));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Parent createContent() {
public Parent createNavigation() {
return UIFactory.createNavigation("Portfolio",
List.of("Home"),
() -> SceneManager.switchTo(SceneFactory.createExchangeView(false)));
() -> SceneManager.switchTo(SceneFactory.createExchangeView(true)));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Parent createContent() {
public Parent createNavigation() {
return UIFactory.createNavigation("Transactions",
List.of("Home"),
() -> SceneManager.switchTo(SceneFactory.createExchangeView(false)));
() -> SceneManager.switchTo(SceneFactory.createExchangeView(true)));
}

/**
Expand Down

0 comments on commit e153764

Please sign in to comment.