mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-03 18:14:18 +02:00
dynamically set players in ChoosePatner
This commit is contained in:
@@ -12,13 +12,13 @@ import java.util.List;
|
||||
public class TradeHandler {
|
||||
|
||||
private final Player sender;
|
||||
private final Player receiver;
|
||||
private final int offeredAmount;
|
||||
private final List<PropertyField> offeredProperties;
|
||||
private final int offeredJailCards;
|
||||
private final int requestedAmount;
|
||||
private final List<PropertyField> requestedProperties;
|
||||
private final int requestedJailCards;
|
||||
private Player receiver;
|
||||
private int offeredAmount;
|
||||
private List<PropertyField> offeredProperties;
|
||||
private int offeredJailCards;
|
||||
private int requestedAmount;
|
||||
private List<PropertyField> requestedProperties;
|
||||
private int requestedJailCards;
|
||||
private Boolean status = null;
|
||||
|
||||
/**
|
||||
@@ -45,6 +45,22 @@ public class TradeHandler {
|
||||
this.requestedJailCards = requestedJailCards;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a TradeHandler for a single trade instance.
|
||||
*
|
||||
* @param sender the Player initiating the trade
|
||||
* @param receiver the Player receiving the trade offer
|
||||
* @param offeredAmount the amount of money offered by the sender
|
||||
* @param offeredProperties the properties offered by the sender
|
||||
* @param offeredJailCards the jail cards offered by the sender
|
||||
* @param requestedAmount the amount of money requested from the receiver
|
||||
* @param requestedProperties the properties requested from the receiver
|
||||
* @param requestedJailCards the jail cards requested from the receiver
|
||||
*/
|
||||
public TradeHandler(Player sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public int getOfferedAmount() {
|
||||
return offeredAmount;
|
||||
}
|
||||
@@ -209,4 +225,32 @@ public class TradeHandler {
|
||||
}
|
||||
System.out.println(numCards + " jail card(s) transferred from " + from.getName() + " to " + to.getName());
|
||||
}
|
||||
|
||||
public void setOfferedAmount(int offeredAmount) {
|
||||
this.offeredAmount = offeredAmount;
|
||||
}
|
||||
|
||||
public void setOfferedJailCards(int offeredJailCards) {
|
||||
this.offeredJailCards = offeredJailCards;
|
||||
}
|
||||
|
||||
public void setOfferedProperties(List<PropertyField> offeredProperties) {
|
||||
this.offeredProperties = offeredProperties;
|
||||
}
|
||||
|
||||
public void setReceiver(Player receiver) {
|
||||
this.receiver = receiver;
|
||||
}
|
||||
|
||||
public void setRequestedAmount(int requestedAmount) {
|
||||
this.requestedAmount = requestedAmount;
|
||||
}
|
||||
|
||||
public void setRequestedJailCards(int requestedJailCards) {
|
||||
this.requestedJailCards = requestedJailCards;
|
||||
}
|
||||
|
||||
public void setRequestedProperties(List<PropertyField> requestedProperties) {
|
||||
this.requestedProperties = requestedProperties;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user