From 10e24cf30e6843f3c6660e32eb6ded8d1fb7207d Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sat, 23 Nov 2024 16:16:40 +0100 Subject: [PATCH] small bug fixes --- .../src/main/java/pp/monopoly/model/fields/BoardManager.java | 2 +- .../src/main/java/pp/monopoly/model/fields/GulagField.java | 4 ++++ .../main/java/pp/monopoly/model/fields/TestStreckeField.java | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BoardManager.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BoardManager.java index 6cf575b..d3dafe8 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BoardManager.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BoardManager.java @@ -22,7 +22,7 @@ public class BoardManager { * Creates a Monopoly GameBoard * @return the List of Fields in correct Order */ - private List createBoard() { + public static List createBoard() { ArrayList fields = new ArrayList<>(); fields.add(new GoField()); diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java index 172a1f4..08c3a2c 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java @@ -15,4 +15,8 @@ public class GulagField extends Field{ player.visit(this); } + public int getBailCost() { + return bailCost; + } + } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java index 89da7dc..1ea6ae7 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java @@ -19,6 +19,8 @@ public class TestStreckeField extends Field{ } public int collectMoney() { - return money = 0; + int tmp = money; + money = 0; + return tmp; } }