mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-06 04:55:45 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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());
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user