Merge branch 'gui' into 'connect'

# Conflicts:
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/MonopolyApp.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuildingPropertyCard.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/BuyCard.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/FoodFieldCard.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java
#   Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/WinnerPopUp.java
#   Projekte/monopoly/model/src/main/java/pp/monopoly/game/client/ClientGameLogic.java
This commit is contained in:
Johannes Schmelz
2024-11-25 02:45:02 +00:00
19 changed files with 333 additions and 57 deletions

View File

@@ -226,7 +226,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
@Override
public void received(EventDrawCard msg) {
setInfoText("Event card drawn: " + msg.getCardDescription());
//event card logic
// Kartenlogik
playSound(Sound.EVENT_CARD);
}

View File

@@ -95,7 +95,7 @@ public class Player implements FieldVisitor<Void>{
* Set the name of the Player
* @param name the new name
*/
void setName(String name) {
public void setName(String name) {
this.name = name;
}
@@ -179,6 +179,7 @@ public class Player implements FieldVisitor<Void>{
public void buyProperty(PropertyField property) {
if (property.getOwner() == null && accountBalance >= property.getPrice()) {
properties.add(property);
property.setOwner(this);
pay(property.getPrice());
}
}

View File

@@ -165,7 +165,7 @@ public class PlayerHandler {
* @param id the id to be searched for
* @return the player with the required id
*/
Player getPlayerById(int id) {
public Player getPlayerById(int id) {
for (Player player : players) {
if (player.getId() == id) return player;
}
@@ -184,7 +184,7 @@ public class PlayerHandler {
players.get(0).setActive();
}
void setStartBalance(int amount) {
public void setStartBalance(int amount) {
for (Player player : players) {
player.setAccountBalance(amount);
}

View File

@@ -15,9 +15,9 @@ public class Card {
visitor.visit(this, player);
}
String getDescription() {
public String getDescription() {
return description;
}
} // TODO wird gerade in der EventCard zur erstellung des Popup genutzt
String getKeyword() {
return keyword;