diff --git a/src/main/java/edu/ntnu/iir/bidata/view/common/BoardManagementUI.java b/src/main/java/edu/ntnu/iir/bidata/view/common/BoardManagementUI.java index d74fca6..2ce3736 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/common/BoardManagementUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/common/BoardManagementUI.java @@ -102,7 +102,7 @@ public void showRemoveBoardDialog() { }); Scene scene = new Scene(layout, 350, 200); - scene.getStylesheets().add(getClass().getResource("/styles.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/styles.css").toExternalForm()); removeDialog.setScene(scene); removeDialog.showAndWait(); } diff --git a/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXBoardGameLauncher.java b/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXBoardGameLauncher.java index 067631d..ab8598a 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXBoardGameLauncher.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXBoardGameLauncher.java @@ -251,8 +251,8 @@ public void showSnakesAndLaddersGameBoardWithLoad(Stage stage, String gameName) scene .getStylesheets() .addAll( - getClass().getResource("/styles.css").toExternalForm(), - getClass().getResource("/snakesandladders.css").toExternalForm()); + getClass().getResource("/style/styles.css").toExternalForm(), + getClass().getResource("/style/snakesandladders.css").toExternalForm()); stage.setScene(scene); stage.show(); } catch (Exception e) { diff --git a/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXGameUI.java b/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXGameUI.java index f250d13..eef057f 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXGameUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/common/JavaFXGameUI.java @@ -100,7 +100,7 @@ protected void setupUI() { controls.getChildren().addAll(diceView, nextTurnButton, gameControls); root.setBottom(controls); Scene scene = new Scene(root, 800, 600); - scene.getStylesheets().add(getClass().getResource("/styles.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/styles.css").toExternalForm()); primaryStage.setScene(scene); } diff --git a/src/main/java/edu/ntnu/iir/bidata/view/common/MainMenuUI.java b/src/main/java/edu/ntnu/iir/bidata/view/common/MainMenuUI.java index 23dec2d..2a0e818 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/common/MainMenuUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/common/MainMenuUI.java @@ -123,7 +123,7 @@ private void setupMainMenu() { root.setBottom(creditPane); Scene scene = new Scene(root, 1000, 700); - scene.getStylesheets().add(getClass().getResource("/common.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/common.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } diff --git a/src/main/java/edu/ntnu/iir/bidata/view/common/PlayerSelectionUI.java b/src/main/java/edu/ntnu/iir/bidata/view/common/PlayerSelectionUI.java index 52a4175..dc120b0 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/common/PlayerSelectionUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/common/PlayerSelectionUI.java @@ -206,7 +206,7 @@ private void setupUI() { root.setBottom(bottomBox); Scene scene = new Scene(root, 600, 700); - scene.getStylesheets().add(getClass().getResource("/common.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/common.css").toExternalForm()); stage.setScene(scene); // Add double-click functionality for quicker selection @@ -405,7 +405,7 @@ private void showAddPlayerDialog() { }); Scene scene = new Scene(layout, 400, 300); - scene.getStylesheets().add(getClass().getResource("/common.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/common.css").toExternalForm()); addDialog.setScene(scene); addDialog.showAndWait(); } @@ -562,7 +562,7 @@ private void showTokenSelectionDialog(String playerName) { }); Scene scene = new Scene(layout, 400, 200); - scene.getStylesheets().add(getClass().getResource("/common.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/common.css").toExternalForm()); tokenDialog.setScene(scene); tokenDialog.showAndWait(); } diff --git a/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyGameUI.java b/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyGameUI.java index 34ce05c..5f88aa0 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyGameUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyGameUI.java @@ -288,8 +288,8 @@ public void setupUI() { animator = new MonopolyAnimator(this, tilePanes, playerTokensByName); // Add stylesheets - getScene().getStylesheets().add(getClass().getResource("/monopoly.css").toExternalForm()); - getScene().getStylesheets().add(getClass().getResource("/styles.css").toExternalForm()); + getScene().getStylesheets().add(getClass().getResource("/style/monopoly.css").toExternalForm()); + getScene().getStylesheets().add(getClass().getResource("/style/styles.css").toExternalForm()); } /** diff --git a/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyMenuUI.java b/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyMenuUI.java index 8d8347d..607a04e 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyMenuUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/monopoly/MonopolyMenuUI.java @@ -210,8 +210,8 @@ private void setupMenu() { root.setCenter(centerBox); Scene scene = new Scene(root, 1200, 800); - scene.getStylesheets().add(getClass().getResource("/monopoly.css").toExternalForm()); - scene.getStylesheets().add(getClass().getResource("/styles.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/monopoly.css").toExternalForm()); + scene.getStylesheets().add(getClass().getResource("/style/styles.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } diff --git a/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersGameUI.java b/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersGameUI.java index 72d82d9..4d00255 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersGameUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersGameUI.java @@ -85,7 +85,7 @@ public SnakesAndLaddersGameUI( controller, playerNames, mediator, - "/snakes_and_ladders_board.jpeg"); + "/snakeandladder_boardgame/snakes_and_ladders_board.jpeg"); } /** @@ -173,7 +173,8 @@ protected void setupUI() { topBar.setAlignment(Pos.CENTER_LEFT); Button backButton = CommonButtons.backToMainMenu(primaryStage, false, controller); backButton.getStyleClass().add("game-control-button"); - topBar.getChildren().addAll(backButton, saveButton); + Button saveBtn = CommonButtons.saveGameBtn(false, controller, new Label()); + topBar.getChildren().addAll(backButton, saveBtn); root.setTop(topBar); // --- Bottom bar: Dice view and Roll button --- diff --git a/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersMenuUI.java b/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersMenuUI.java index 6e09361..cd32250 100644 --- a/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersMenuUI.java +++ b/src/main/java/edu/ntnu/iir/bidata/view/snakesandladders/SnakesAndLaddersMenuUI.java @@ -179,9 +179,12 @@ private VBox setUpCenterBox() { Button mediumBtn = createMenuButton("Level: Medium"); Button hardBtn = createMenuButton("Level: Hard"); - easyBtn.setOnAction(e -> startGameWithLevel("easy", "/snakes_and_ladders_easy.jpg")); - mediumBtn.setOnAction(e -> startGameWithLevel("medium", "/snakes_and_ladders_board.jpeg")); - hardBtn.setOnAction(e -> startGameWithLevel("hard", "/snakes_and_ladders_hard_board.png")); + easyBtn.setOnAction(e -> startGameWithLevel("easy", + "/snakeandladder_boardgame/snakes_and_ladders_easy.jpg")); + mediumBtn.setOnAction(e -> startGameWithLevel("medium", + "/snakeandladder_boardgame/snakes_and_ladders_board.jpeg")); + hardBtn.setOnAction(e -> startGameWithLevel("hard", + "/snakeandladder_boardgame/snakes_and_ladders_hard_board.png")); HBox levelButtons = new HBox(20, easyBtn, mediumBtn, hardBtn); levelButtons.setAlignment(Pos.CENTER); @@ -210,8 +213,8 @@ private void createAndSetScene(BorderPane gameUI) { scene .getStylesheets() .addAll( - getClass().getResource("/styles.css").toExternalForm(), - getClass().getResource("/snakesandladders.css").toExternalForm()); + getClass().getResource("/style/styles.css").toExternalForm(), + getClass().getResource("/style/snakesandladders.css").toExternalForm()); primaryStage.setScene(scene); primaryStage.show(); } @@ -440,9 +443,9 @@ private SnakesAndLaddersGameUI getSnakesAndLaddersGameUI(String gameName, BoardG // Determine image path based on level String imagePath = switch (level) { - case "easy" -> "/snakes_and_ladders_easy.jpg"; - case "hard" -> "/snakes_and_ladders_hard_board.png"; - default -> "/snakes_and_ladders_board.jpeg"; + case "easy" -> "/snakeandladder_boardgame/snakes_and_ladders_easy.jpg"; + case "hard" -> "/snakeandladder_boardgame/snakes_and_ladders_hard_board.png"; + default -> "/snakeandladder_boardgame/snakes_and_ladders_board.jpeg"; }; SnakesAndLaddersGameUI gameUI = new SnakesAndLaddersGameUI( diff --git a/src/main/resources/saved_games/monopoly/two_player_medium_board.json b/src/main/resources/saved_games/monopoly/two_player_medium_board.json new file mode 100644 index 0000000..eb759f8 --- /dev/null +++ b/src/main/resources/saved_games/monopoly/two_player_medium_board.json @@ -0,0 +1,249 @@ +{ + "currentPlayerIndex": 0, + "players": [ + { + "currentTile": { + "id": 9 + }, + "tokenImage": "token_green.png", + "money": 1360, + "playerType": "MONOPOLY", + "name": "Katrina", + "position": 9 + }, + { + "currentTile": { + "id": 12 + }, + "tokenImage": "token_purple.png", + "money": 1340, + "playerType": "MONOPOLY", + "name": "Kareena", + "position": 12 + } + ], + "dice": { + "dice": [ + { + "lastRolledValue": 6 + }, + { + "lastRolledValue": 6 + } + ] + }, + "board": { + "tiles": { + "22": { + "nextTileId": 23, + "price": 220, + "id": 22, + "type": "PropertyTile", + "rent": 44, + "group": 2 + }, + "23": { + "nextTileId": 24, + "price": 220, + "id": 23, + "type": "PropertyTile", + "rent": 44, + "group": 2 + }, + "24": { + "nextTileId": 25, + "price": 220, + "id": 24, + "type": "PropertyTile", + "rent": 44, + "group": 2 + }, + "25": { + "nextTileId": 26, + "id": 25, + "type": "Tile" + }, + "26": { + "nextTileId": 27, + "price": 240, + "id": 26, + "type": "PropertyTile", + "rent": 48, + "group": 3 + }, + "27": { + "nextTileId": 0, + "price": 240, + "id": 27, + "type": "PropertyTile", + "rent": 48, + "group": 3 + }, + "10": { + "nextTileId": 11, + "price": 140, + "id": 10, + "type": "PropertyTile", + "rent": 28, + "group": 2 + }, + "11": { + "nextTileId": 12, + "id": 11, + "type": "Tile" + }, + "12": { + "owner": "Kareena", + "nextTileId": 13, + "price": 160, + "id": 12, + "type": "PropertyTile", + "rent": 32, + "group": 3 + }, + "13": { + "nextTileId": 14, + "price": 160, + "id": 13, + "type": "PropertyTile", + "rent": 32, + "group": 3 + }, + "14": { + "nextTileId": 15, + "id": 14, + "type": "FreeParkingTile" + }, + "15": { + "nextTileId": 16, + "price": 180, + "id": 15, + "type": "PropertyTile", + "rent": 36, + "group": 0 + }, + "16": { + "nextTileId": 17, + "price": 180, + "id": 16, + "type": "PropertyTile", + "rent": 36, + "group": 0 + }, + "17": { + "nextTileId": 18, + "price": 180, + "id": 17, + "type": "PropertyTile", + "rent": 36, + "group": 0 + }, + "18": { + "nextTileId": 19, + "id": 18, + "type": "Tile" + }, + "19": { + "nextTileId": 20, + "price": 200, + "id": 19, + "type": "PropertyTile", + "rent": 40, + "group": 1 + }, + "0": { + "nextTileId": 1, + "action": { + "type": "CollectMoneyAction" + }, + "id": 0, + "type": "GoTile" + }, + "1": { + "nextTileId": 2, + "price": 100, + "id": 1, + "type": "PropertyTile", + "rent": 20, + "group": 0 + }, + "2": { + "nextTileId": 3, + "price": 100, + "id": 2, + "type": "PropertyTile", + "rent": 20, + "group": 0 + }, + "3": { + "nextTileId": 4, + "price": 100, + "id": 3, + "type": "PropertyTile", + "rent": 20, + "group": 0 + }, + "4": { + "nextTileId": 5, + "id": 4, + "type": "Tile" + }, + "5": { + "nextTileId": 6, + "price": 120, + "id": 5, + "type": "PropertyTile", + "rent": 24, + "group": 1 + }, + "6": { + "nextTileId": 7, + "price": 120, + "id": 6, + "type": "PropertyTile", + "rent": 24, + "group": 1 + }, + "7": { + "nextTileId": 8, + "action": { + "type": "GoToJailAction", + "jailTileId": 21 + }, + "id": 7, + "type": "Tile" + }, + "8": { + "nextTileId": 9, + "price": 140, + "id": 8, + "type": "PropertyTile", + "rent": 28, + "group": 2 + }, + "9": { + "owner": "Katrina", + "nextTileId": 10, + "price": 140, + "id": 9, + "type": "PropertyTile", + "rent": 28, + "group": 2 + }, + "20": { + "nextTileId": 21, + "price": 200, + "id": 20, + "type": "PropertyTile", + "rent": 40, + "group": 1 + }, + "21": { + "nextTileId": 22, + "id": 21, + "type": "JailTile" + } + }, + "boardSize": 28 + } +} \ No newline at end of file diff --git a/src/main/resources/saved_games/monopoly_mid_game.json b/src/main/resources/saved_games/monopoly_mid_game.json deleted file mode 100644 index b55aedb..0000000 --- a/src/main/resources/saved_games/monopoly_mid_game.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "gameType": "MONOPOLY", - "gameName": "Monopoly Mid-Game Save", - "currentPlayerIndex": 2, - "roundNumber": 8, - "gameOver": false, - "players": [ - { - "name": "Katrina", - "currentPosition": 12, - "skipNextTurn": false, - "money": 1200, - "ownedProperties": [1, 3, 6], - "inJail": false, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": false, - "playerType": "MONOPOLY" - }, - { - "name": "Dave", - "currentPosition": 8, - "skipNextTurn": false, - "money": 950, - "ownedProperties": [7, 11], - "inJail": false, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": false, - "playerType": "MONOPOLY" - }, - { - "name": "Anna", - "currentPosition": 10, - "skipNextTurn": true, - "money": 800, - "ownedProperties": [16], - "inJail": true, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": true, - "playerType": "MONOPOLY" - } - ], - "board": { - "sizeOfBoard": 20, - "boardType": "MONOPOLY", - "tiles": [ - {"id": 0, "type": "GO", "action": "CollectMoneyAction"}, - {"id": 1, "type": "PROPERTY", "price": 100, "rent": 10, "group": 0, "owner": "Katrina"}, - {"id": 2, "type": "PROPERTY", "price": 120, "rent": 12, "group": 0, "owner": null}, - {"id": 3, "type": "PROPERTY", "price": 140, "rent": 14, "group": 1, "owner": "Katrina"}, - {"id": 4, "type": "PROPERTY", "price": 160, "rent": 16, "group": 1, "owner": null}, - {"id": 5, "type": "FREE_PARKING"}, - {"id": 6, "type": "PROPERTY", "price": 180, "rent": 18, "group": 2, "owner": "Katrina"}, - {"id": 7, "type": "PROPERTY", "price": 200, "rent": 20, "group": 2, "owner": "Dave"}, - {"id": 8, "type": "PROPERTY", "price": 220, "rent": 22, "group": 3, "owner": null}, - {"id": 9, "type": "PROPERTY", "price": 240, "rent": 24, "group": 3, "owner": null}, - {"id": 10, "type": "JAIL"}, - {"id": 11, "type": "PROPERTY", "price": 260, "rent": 26, "group": 0, "owner": "Dave"}, - {"id": 12, "type": "PROPERTY", "price": 280, "rent": 28, "group": 0, "owner": null}, - {"id": 13, "type": "PROPERTY", "price": 300, "rent": 30, "group": 1, "owner": null}, - {"id": 14, "type": "PROPERTY", "price": 320, "rent": 32, "group": 1, "owner": null}, - {"id": 15, "type": "GO_TO_JAIL", "action": "GoToJailAction"}, - {"id": 16, "type": "PROPERTY", "price": 340, "rent": 34, "group": 2, "owner": "Anna"}, - {"id": 17, "type": "PROPERTY", "price": 360, "rent": 36, "group": 2, "owner": null}, - {"id": 18, "type": "PROPERTY", "price": 380, "rent": 38, "group": 3, "owner": null}, - {"id": 19, "type": "PROPERTY", "price": 400, "rent": 40, "group": 3, "owner": null} - ] - } -} \ No newline at end of file diff --git a/src/main/resources/saved_games/monopoly_starter_game.json b/src/main/resources/saved_games/monopoly_starter_game.json deleted file mode 100644 index c1c9053..0000000 --- a/src/main/resources/saved_games/monopoly_starter_game.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "gameType": "MONOPOLY", - "gameName": "Monopoly Starter Game", - "currentPlayerIndex": 0, - "roundNumber": 1, - "gameOver": false, - "players": [ - { - "name": "Player 1", - "currentPosition": 0, - "skipNextTurn": false, - "money": 1500, - "ownedProperties": [], - "inJail": false, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": false, - "playerType": "MONOPOLY" - }, - { - "name": "Player 2", - "currentPosition": 0, - "skipNextTurn": false, - "money": 1500, - "ownedProperties": [], - "inJail": false, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": false, - "playerType": "MONOPOLY" - }, - { - "name": "Player 3", - "currentPosition": 0, - "skipNextTurn": false, - "money": 1500, - "ownedProperties": [], - "inJail": false, - "paidToLeaveJail": false, - "canLeaveJailNextTurn": false, - "playerType": "MONOPOLY" - } - ], - "board": { - "sizeOfBoard": 20, - "boardType": "MONOPOLY", - "tiles": [ - {"id": 0, "type": "GO", "action": "CollectMoneyAction"}, - {"id": 1, "type": "PROPERTY", "price": 100, "rent": 10, "group": 0, "owner": null}, - {"id": 2, "type": "PROPERTY", "price": 120, "rent": 12, "group": 0, "owner": null}, - {"id": 3, "type": "PROPERTY", "price": 140, "rent": 14, "group": 1, "owner": null}, - {"id": 4, "type": "PROPERTY", "price": 160, "rent": 16, "group": 1, "owner": null}, - {"id": 5, "type": "FREE_PARKING"}, - {"id": 6, "type": "PROPERTY", "price": 180, "rent": 18, "group": 2, "owner": null}, - {"id": 7, "type": "PROPERTY", "price": 200, "rent": 20, "group": 2, "owner": null}, - {"id": 8, "type": "PROPERTY", "price": 220, "rent": 22, "group": 3, "owner": null}, - {"id": 9, "type": "PROPERTY", "price": 240, "rent": 24, "group": 3, "owner": null}, - {"id": 10, "type": "JAIL"}, - {"id": 11, "type": "PROPERTY", "price": 260, "rent": 26, "group": 0, "owner": null}, - {"id": 12, "type": "PROPERTY", "price": 280, "rent": 28, "group": 0, "owner": null}, - {"id": 13, "type": "PROPERTY", "price": 300, "rent": 30, "group": 1, "owner": null}, - {"id": 14, "type": "PROPERTY", "price": 320, "rent": 32, "group": 1, "owner": null}, - {"id": 15, "type": "GO_TO_JAIL", "action": "GoToJailAction"}, - {"id": 16, "type": "PROPERTY", "price": 340, "rent": 34, "group": 2, "owner": null}, - {"id": 17, "type": "PROPERTY", "price": 360, "rent": 36, "group": 2, "owner": null}, - {"id": 18, "type": "PROPERTY", "price": 380, "rent": 38, "group": 3, "owner": null}, - {"id": 19, "type": "PROPERTY", "price": 400, "rent": 40, "group": 3, "owner": null} - ] - } -} diff --git a/src/main/resources/saved_games/snakes_and_ladders_mid_game.json b/src/main/resources/saved_games/snakes_and_ladders_mid_game.json deleted file mode 100644 index a252541..0000000 --- a/src/main/resources/saved_games/snakes_and_ladders_mid_game.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "gameType": "SNAKES_AND_LADDERS", - "gameName": "Snakes and Ladders Mid-Game Save", - "currentPlayerIndex": 1, - "roundNumber": 15, - "gameOver": false, - "players": [ - { - "name": "Player 1", - "currentPosition": 45, - "skipNextTurn": false, - "playerType": "SNAKES_AND_LADDERS" - }, - { - "name": "Player 2", - "currentPosition": 78, - "skipNextTurn": true, - "playerType": "SNAKES_AND_LADDERS" - }, - { - "name": "Player 3", - "currentPosition": 92, - "skipNextTurn": false, - "playerType": "SNAKES_AND_LADDERS" - } - ], - "board": { - "sizeOfBoard": 100, - "boardType": "SNAKES_AND_LADDERS", - "tiles": [ - {"id": 0, "type": "START"}, - {"id": 3, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 36}}, - {"id": 8, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 12}}, - {"id": 14, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 26}}, - {"id": 29, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 11}}, - {"id": 31, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 73}}, - {"id": 38, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 2}}, - {"id": 59, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 80}}, - {"id": 78, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 15}}, - {"id": 83, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 97}}, - {"id": 89, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 86}}, - {"id": 90, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 92}}, - {"id": 95, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 75}}, - {"id": 99, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 41}}, - {"id": 100, "type": "END"} - ] - } -} \ No newline at end of file diff --git a/src/main/resources/saved_games/snakes_and_ladders_starter.json b/src/main/resources/saved_games/snakes_and_ladders_starter.json deleted file mode 100644 index 56701e5..0000000 --- a/src/main/resources/saved_games/snakes_and_ladders_starter.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "gameType": "SNAKES_AND_LADDERS", - "gameName": "Snakes and Ladders Starter Game", - "currentPlayerIndex": 0, - "roundNumber": 1, - "gameOver": false, - "players": [ - { - "name": "Player 1", - "currentPosition": 0, - "skipNextTurn": false, - "playerType": "SNAKES_AND_LADDERS" - }, - { - "name": "Player 2", - "currentPosition": 0, - "skipNextTurn": false, - "playerType": "SNAKES_AND_LADDERS" - }, - { - "name": "Player 3", - "currentPosition": 0, - "skipNextTurn": false, - "playerType": "SNAKES_AND_LADDERS" - } - ], - "board": { - "sizeOfBoard": 100, - "boardType": "SNAKES_AND_LADDERS", - "tiles": [ - {"id": 0, "type": "START"}, - {"id": 3, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 36}}, - {"id": 8, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 12}}, - {"id": 14, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 26}}, - {"id": 29, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 11}}, - {"id": 31, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 73}}, - {"id": 38, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 2}}, - {"id": 59, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 80}}, - {"id": 78, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 15}}, - {"id": 83, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 97}}, - {"id": 89, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 86}}, - {"id": 90, "type": "LADDER", "action": {"type": "LadderAction", "topTileId": 92}}, - {"id": 95, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 75}}, - {"id": 99, "type": "SNAKE", "action": {"type": "SnakeAction", "tailTileId": 41}}, - {"id": 100, "type": "END"} - ] - } -} \ No newline at end of file diff --git a/src/main/resources/saved_games/snakesandladder/two_player_easy_game.json b/src/main/resources/saved_games/snakesandladder/two_player_easy_game.json new file mode 100644 index 0000000..4c2803d --- /dev/null +++ b/src/main/resources/saved_games/snakesandladder/two_player_easy_game.json @@ -0,0 +1,533 @@ +{ + "board": { + "tiles": { + "0": { + "id": 0, + "type": "Tile", + "nextTileId": 1 + }, + "1": { + "id": 1, + "type": "Tile", + "nextTileId": 2 + }, + "2": { + "id": 2, + "type": "Tile", + "nextTileId": 3 + }, + "3": { + "id": 3, + "type": "Tile", + "nextTileId": 4 + }, + "4": { + "id": 4, + "type": "Tile", + "nextTileId": 5, + "action": { + "type": "LadderAction", + "topTileId": 16 + } + }, + "5": { + "id": 5, + "type": "Tile", + "nextTileId": 6 + }, + "6": { + "id": 6, + "type": "Tile", + "nextTileId": 7 + }, + "7": { + "id": 7, + "type": "Tile", + "nextTileId": 8 + }, + "8": { + "id": 8, + "type": "Tile", + "nextTileId": 9 + }, + "9": { + "id": 9, + "type": "Tile", + "nextTileId": 10 + }, + "10": { + "id": 10, + "type": "Tile", + "nextTileId": 11 + }, + "11": { + "id": 11, + "type": "Tile", + "nextTileId": 12 + }, + "12": { + "id": 12, + "type": "Tile", + "nextTileId": 13 + }, + "13": { + "id": 13, + "type": "Tile", + "nextTileId": 14 + }, + "14": { + "id": 14, + "type": "Tile", + "nextTileId": 15 + }, + "15": { + "id": 15, + "type": "Tile", + "nextTileId": 16 + }, + "16": { + "id": 16, + "type": "Tile", + "nextTileId": 17 + }, + "17": { + "id": 17, + "type": "Tile", + "nextTileId": 18 + }, + "18": { + "id": 18, + "type": "Tile", + "nextTileId": 19 + }, + "19": { + "id": 19, + "type": "Tile", + "nextTileId": 20, + "action": { + "type": "LadderAction", + "topTileId": 40 + } + }, + "20": { + "id": 20, + "type": "Tile", + "nextTileId": 21 + }, + "21": { + "id": 21, + "type": "Tile", + "nextTileId": 22 + }, + "22": { + "id": 22, + "type": "Tile", + "nextTileId": 23 + }, + "23": { + "id": 23, + "type": "Tile", + "nextTileId": 24 + }, + "24": { + "id": 24, + "type": "Tile", + "nextTileId": 25 + }, + "25": { + "id": 25, + "type": "Tile", + "nextTileId": 26 + }, + "26": { + "id": 26, + "type": "Tile", + "nextTileId": 27 + }, + "27": { + "id": 27, + "type": "Tile", + "nextTileId": 28 + }, + "28": { + "id": 28, + "type": "Tile", + "nextTileId": 29, + "action": { + "type": "LadderAction", + "topTileId": 47 + } + }, + "29": { + "id": 29, + "type": "Tile", + "nextTileId": 30 + }, + "30": { + "id": 30, + "type": "Tile", + "nextTileId": 31 + }, + "31": { + "id": 31, + "type": "Tile", + "nextTileId": 32 + }, + "32": { + "id": 32, + "type": "Tile", + "nextTileId": 33 + }, + "33": { + "id": 33, + "type": "Tile", + "nextTileId": 34 + }, + "34": { + "id": 34, + "type": "Tile", + "nextTileId": 35 + }, + "35": { + "id": 35, + "type": "Tile", + "nextTileId": 36 + }, + "36": { + "id": 36, + "type": "Tile", + "nextTileId": 37 + }, + "37": { + "id": 37, + "type": "Tile", + "nextTileId": 38 + }, + "38": { + "id": 38, + "type": "Tile", + "nextTileId": 39 + }, + "39": { + "id": 39, + "type": "Tile", + "nextTileId": 40 + }, + "40": { + "id": 40, + "type": "Tile", + "nextTileId": 41 + }, + "41": { + "id": 41, + "type": "Tile", + "nextTileId": 42 + }, + "42": { + "id": 42, + "type": "Tile", + "nextTileId": 43 + }, + "43": { + "id": 43, + "type": "Tile", + "nextTileId": 44 + }, + "44": { + "id": 44, + "type": "Tile", + "nextTileId": 45 + }, + "45": { + "id": 45, + "type": "Tile", + "nextTileId": 46 + }, + "46": { + "id": 46, + "type": "Tile", + "nextTileId": 47 + }, + "47": { + "id": 47, + "type": "Tile", + "nextTileId": 48 + }, + "48": { + "id": 48, + "type": "Tile", + "nextTileId": 49 + }, + "49": { + "id": 49, + "type": "Tile", + "nextTileId": 50, + "action": { + "type": "SnakeAction", + "tailTileId": 31 + } + }, + "50": { + "id": 50, + "type": "Tile", + "nextTileId": 51 + }, + "51": { + "id": 51, + "type": "Tile", + "nextTileId": 52 + }, + "52": { + "id": 52, + "type": "Tile", + "nextTileId": 53, + "action": { + "type": "LadderAction", + "topTileId": 70 + } + }, + "53": { + "id": 53, + "type": "Tile", + "nextTileId": 54 + }, + "54": { + "id": 54, + "type": "Tile", + "nextTileId": 55 + }, + "55": { + "id": 55, + "type": "Tile", + "nextTileId": 56 + }, + "56": { + "id": 56, + "type": "Tile", + "nextTileId": 57 + }, + "57": { + "id": 57, + "type": "Tile", + "nextTileId": 58, + "action": { + "type": "LadderAction", + "topTileId": 85 + } + }, + "58": { + "id": 58, + "type": "Tile", + "nextTileId": 59, + "action": { + "type": "SnakeAction", + "tailTileId": 24 + } + }, + "59": { + "id": 59, + "type": "Tile", + "nextTileId": 60 + }, + "60": { + "id": 60, + "type": "Tile", + "nextTileId": 61 + }, + "61": { + "id": 61, + "type": "Tile", + "nextTileId": 62 + }, + "62": { + "id": 62, + "type": "Tile", + "nextTileId": 63, + "action": { + "type": "LadderAction", + "topTileId": 80 + } + }, + "63": { + "id": 63, + "type": "Tile", + "nextTileId": 64 + }, + "64": { + "id": 64, + "type": "Tile", + "nextTileId": 65 + }, + "65": { + "id": 65, + "type": "Tile", + "nextTileId": 66 + }, + "66": { + "id": 66, + "type": "Tile", + "nextTileId": 67 + }, + "67": { + "id": 67, + "type": "Tile", + "nextTileId": 68 + }, + "68": { + "id": 68, + "type": "Tile", + "nextTileId": 69 + }, + "69": { + "id": 69, + "type": "Tile", + "nextTileId": 70 + }, + "70": { + "id": 70, + "type": "Tile", + "nextTileId": 71 + }, + "71": { + "id": 71, + "type": "Tile", + "nextTileId": 72 + }, + "72": { + "id": 72, + "type": "Tile", + "nextTileId": 73 + }, + "73": { + "id": 73, + "type": "Tile", + "nextTileId": 74 + }, + "74": { + "id": 74, + "type": "Tile", + "nextTileId": 75 + }, + "75": { + "id": 75, + "type": "Tile", + "nextTileId": 76 + }, + "76": { + "id": 76, + "type": "Tile", + "nextTileId": 77 + }, + "77": { + "id": 77, + "type": "Tile", + "nextTileId": 78 + }, + "78": { + "id": 78, + "type": "Tile", + "nextTileId": 79 + }, + "79": { + "id": 79, + "type": "Tile", + "nextTileId": 80 + }, + "80": { + "id": 80, + "type": "Tile", + "nextTileId": 81 + }, + "81": { + "id": 81, + "type": "Tile", + "nextTileId": 82 + }, + "82": { + "id": 82, + "type": "Tile", + "nextTileId": 83, + "action": { + "type": "SnakeAction", + "tailTileId": 78 + } + }, + "83": { + "id": 83, + "type": "Tile", + "nextTileId": 84 + }, + "84": { + "id": 84, + "type": "Tile", + "nextTileId": 85 + }, + "85": { + "id": 85, + "type": "Tile", + "nextTileId": 86 + }, + "86": { + "id": 86, + "type": "Tile", + "nextTileId": 87 + }, + "87": { + "id": 87, + "type": "Tile", + "nextTileId": 88 + }, + "88": { + "id": 88, + "type": "Tile", + "nextTileId": 89, + "action": { + "type": "SnakeAction", + "tailTileId": 45 + } + }, + "89": { + "id": 89, + "type": "Tile" + } + }, + "boardSize": 90 + }, + "players": [ + { + "name": "Tom", + "currentTile": { + "id": 11, + "type": "Tile", + "nextTileId": 12 + }, + "skipNextTurn": false, + "tokenImage": "token_blue.png" + }, + { + "name": "Kareena", + "currentTile": { + "id": 16, + "type": "Tile", + "nextTileId": 17 + }, + "skipNextTurn": false, + "tokenImage": "token_purple.png" + } + ], + "dice": { + "dice": [ + { + "lastRolledValue": 3 + }, + { + "lastRolledValue": 1 + } + ] + }, + "currentPlayerIndex": 0, + "gameOver": false, + "gameInitialized": true, + "roundNumber": 1, + "level": "easy" +} \ No newline at end of file diff --git a/src/main/resources/snakes_and_ladders_board.jpeg b/src/main/resources/snakeandladder_boardgame/snakes_and_ladders_board.jpeg similarity index 100% rename from src/main/resources/snakes_and_ladders_board.jpeg rename to src/main/resources/snakeandladder_boardgame/snakes_and_ladders_board.jpeg diff --git a/src/main/resources/snakes_and_ladders_easy.jpg b/src/main/resources/snakeandladder_boardgame/snakes_and_ladders_easy.jpg similarity index 100% rename from src/main/resources/snakes_and_ladders_easy.jpg rename to src/main/resources/snakeandladder_boardgame/snakes_and_ladders_easy.jpg diff --git a/src/main/resources/snakes_and_ladders_hard_board.png b/src/main/resources/snakeandladder_boardgame/snakes_and_ladders_hard_board.png similarity index 100% rename from src/main/resources/snakes_and_ladders_hard_board.png rename to src/main/resources/snakeandladder_boardgame/snakes_and_ladders_hard_board.png diff --git a/src/main/resources/common.css b/src/main/resources/style/common.css similarity index 100% rename from src/main/resources/common.css rename to src/main/resources/style/common.css diff --git a/src/main/resources/monopoly.css b/src/main/resources/style/monopoly.css similarity index 100% rename from src/main/resources/monopoly.css rename to src/main/resources/style/monopoly.css diff --git a/src/main/resources/snakesandladders.css b/src/main/resources/style/snakesandladders.css similarity index 100% rename from src/main/resources/snakesandladders.css rename to src/main/resources/style/snakesandladders.css diff --git a/src/main/resources/styles.css b/src/main/resources/style/styles.css similarity index 100% rename from src/main/resources/styles.css rename to src/main/resources/style/styles.css