From 477cbba12d5bd5047af164d855c4ed999f442a20 Mon Sep 17 00:00:00 2001
From: =
Date: Tue, 26 May 2026 23:37:59 +0200
Subject: [PATCH] Fix: Removed unused method
---
.../view/playgame/PlayGameController.java | 33 ++++---------------
1 file changed, 6 insertions(+), 27 deletions(-)
diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/playgame/PlayGameController.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/playgame/PlayGameController.java
index 7fbe560..c2e788b 100644
--- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/playgame/PlayGameController.java
+++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/playgame/PlayGameController.java
@@ -7,10 +7,8 @@
import edu.ntnu.idi.idatt2003.g40.mappe.service.event.EventType;
import edu.ntnu.idi.idatt2003.g40.mappe.view.ViewController;
import edu.ntnu.idi.idatt2003.g40.mappe.view.ViewEnum;
-
import java.io.File;
import java.util.List;
-
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
@@ -22,12 +20,10 @@
*
* Extends {@link ViewController}
*
- *
- * Handles four user actions: navigating to the create-game screen,
+ *
Handles four user actions: navigating to the create-game screen,
* going back to the main menu, uploading a custom save file from
* disk, and opening a save when one of the displayed rows is
- * clicked.
- *
+ * clicked.
*/
public class PlayGameController extends ViewController {
@@ -38,19 +34,6 @@ public class PlayGameController extends ViewController {
* */
private final SaveGameService saveGameService;
- /**
- * Constructor with a default {@link SaveGameService} pointing at
- * the bundled saves directory.
- *
- * @param view the {@link PlayGameView} this controller is
- * attached to.
- * @param eventManager the active {@link EventManager}.
- */
- public PlayGameController(final PlayGameView view,
- final EventManager eventManager) {
- this(view, eventManager, new SaveGameService());
- }
-
/**
* Constructor accepting an explicit {@link SaveGameService} for
* tests or custom save locations.
@@ -122,12 +105,10 @@ protected void initInteractions() {
* Re-reads every save from disk and returns the one whose name
* matches, or {@code null} if no matching save is found.
*
- *
- * Used to defeat the staleness of the {@link SaveGame} instance
+ *
Used to defeat the staleness of the {@link SaveGame} instance
* bound to the clicked row in {@link PlayGameView}: between when
* {@link #refresh()} last ran and the click, the auto-save flow may
- * have written newer content to disk.
- *
+ * have written newer content to disk.
*
* @param name the save display name to look up.
* @return the freshly parsed {@link SaveGame}, or {@code null}.
@@ -149,10 +130,8 @@ private SaveGame findFreshSaveByName(final String name) {
* disk. Parses it using {@link SaveGameService#loadSaveFromFile} and
* appends the resulting save to the view's current list.
*
- *
- * Shows an alert if the user picks a file that contains no valid
- * save entry.
- *
+ * Shows an alert if the user picks a file that contains no valid
+ * save entry.
*/
private void handleUploadSave() {
FileChooser fileChooser = new FileChooser();