mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-05 16:25:23 +02:00
send player ready
This commit is contained in:
@@ -144,6 +144,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
||||
LOGGER.log(Level.ERROR, "trying to send {0} with sender==null", msg); //NON-NLS
|
||||
} else {
|
||||
clientSender.send(msg);
|
||||
System.out.println("Message gesendet");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,19 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
/**
|
||||
* Represents a request from a player to buy a property.
|
||||
*/
|
||||
@Serializable
|
||||
public class BuyPropertyRequest extends ClientMessage{
|
||||
private int propertyId;
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private BuyPropertyRequest() { /* empty */ }
|
||||
|
||||
/**
|
||||
* Constructs a BuyPropertyRequest with the specified property ID.
|
||||
*
|
||||
|
@@ -1,9 +1,18 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
/**
|
||||
* Represents a message indicating the player wants to end their turn.
|
||||
*/
|
||||
@Serializable
|
||||
public class EndTurn extends ClientMessage{
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
public EndTurn() { /* empty */ }
|
||||
|
||||
@Override
|
||||
public void accept(ClientInterpreter interpreter, int from) {
|
||||
interpreter.received(this, from);
|
||||
|
@@ -1,13 +1,21 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
/**
|
||||
* Represents a message indicating the player is ready to play.
|
||||
*/
|
||||
@Serializable
|
||||
public class PlayerReady extends ClientMessage {
|
||||
private final boolean isReady;
|
||||
private final String name;
|
||||
private final String figure;
|
||||
private final int startMoney;
|
||||
private boolean isReady;
|
||||
private String name;
|
||||
private String figure;
|
||||
private int startMoney;
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private PlayerReady() { /* empty */ }
|
||||
|
||||
/**
|
||||
* Constructs a PlayerReady message.
|
||||
|
@@ -1,9 +1,18 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
/**
|
||||
* Represents a message requesting to roll the dice.
|
||||
*/
|
||||
@Serializable
|
||||
public class RollDice extends ClientMessage{
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private RollDice() { /* empty */ }
|
||||
|
||||
@Override
|
||||
public void accept(ClientInterpreter interpreter, int from) {
|
||||
interpreter.received(this, from);
|
||||
|
@@ -1,14 +1,21 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
import pp.monopoly.model.TradeHandler;
|
||||
|
||||
/**
|
||||
* Represents a trade Request message from one player to another.
|
||||
*/
|
||||
@Serializable
|
||||
public class TradeOffer extends ClientMessage{
|
||||
private int receiverId;
|
||||
private TradeHandler tradehandler;
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private TradeOffer() { /* empty */ }
|
||||
|
||||
/**
|
||||
* Constructs a TradeOffer with the specified details.
|
||||
|
@@ -1,14 +1,22 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
import pp.monopoly.model.TradeHandler;
|
||||
|
||||
/**
|
||||
* Represents a response to a trade offer.
|
||||
*/
|
||||
@Serializable
|
||||
public class TradeResponse extends ClientMessage{
|
||||
private int initiatorId;
|
||||
private TradeHandler tradeHandler;
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private TradeResponse() { /* empty */ }
|
||||
|
||||
/**
|
||||
* Constructs a TradeResponse with the specified response details.
|
||||
*
|
||||
|
@@ -1,13 +1,21 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
import pp.monopoly.game.server.Player;
|
||||
|
||||
/**
|
||||
* Represents a request from a player to view their assets.
|
||||
*/
|
||||
@Serializable
|
||||
public class ViewAssetsRequest extends ClientMessage{
|
||||
|
||||
private final Player player;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Default constructor for serialization purposes.
|
||||
*/
|
||||
private ViewAssetsRequest() { /* empty */ }
|
||||
|
||||
public ViewAssetsRequest(Player player) {
|
||||
this.player = player;
|
||||
|
Reference in New Issue
Block a user