From dd7cf029bd1d1a63bff0f7bfaa1c0f2b94e5263a Mon Sep 17 00:00:00 2001 From: = Date: Tue, 26 May 2026 20:06:10 +0200 Subject: [PATCH] Fix: Fixed save warning --- .../view/playgame/PlayGameController.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 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 b5001f3..7fbe560 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 @@ -175,13 +175,27 @@ private void handleUploadSave() { if (uploadedSave == null) { showAlert(AlertType.WARNING, "No saves found", - "Den valgte filen inneholdt ingen gyldig save.\n\n" - + "Forventet JSON-format:\n" + "The chosen file includes an unsupported format!\n\n" + + "Expected JSON format:\n" + " {\n" + " \"name\": \"MySave\",\n" + " \"balance\": 10000.00,\n" + " \"startingCapital\": 10000.00,\n" + " \"stockDataPath\": null\n" + + " \"week\": 1\n" + + " \"ownedShares\": [\n" + + " { \"symbol\": \"AAPL\", \"quantity\": 5, \"purchasePrice\": 150.00 }\n" + + " ]\n" + + " \"transactions\": [\n" + + " { \"type\": \"PURCHASE\", \"symbol\": \"AAPL\", \"quantity\": 5, \"price\": 150.00, \"week\": 1}\n" + + " ]\n" + + " \"stocks\": [\n" + + " { \"symbol\": \"AAPL\", \"companyName\": \"Apple inc.\", \"salesPrice\": 155.25}\n" + + " ]\n" + + " \"netWorthHistory\": [\n" + + " 1001.10,\n" + + " 1025.24,\n" + + " ]\n" + " }"); return; }