mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-10 16:37:11 +02:00
Spieler Lobby
This commit is contained in:
@@ -1,50 +1,38 @@
|
||||
package pp.monopoly.message.client;
|
||||
|
||||
import pp.monopoly.game.server.PlayerColor;
|
||||
|
||||
/**
|
||||
* Represents a message indicating the player is ready to play.
|
||||
*/
|
||||
public class PlayerReady extends ClientMessage{
|
||||
public class PlayerReady extends ClientMessage {
|
||||
private boolean isReady;
|
||||
private String name;
|
||||
private PlayerColor color;
|
||||
private String figure;
|
||||
|
||||
/**
|
||||
* Constructs a PlayerReady message.
|
||||
*
|
||||
* @param isReady true if the player is ready, false otherwise
|
||||
* @param name the name of the player
|
||||
* @param color the color of the player (can be null)
|
||||
*/
|
||||
public PlayerReady(boolean isReady) {
|
||||
public PlayerReady(boolean isReady, String name, String figure) {
|
||||
this.isReady = isReady;
|
||||
this.name = name;
|
||||
this.figure = figure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for the Name
|
||||
* @return the Name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for the Playercolor
|
||||
* @return the Playercolor
|
||||
*/
|
||||
public PlayerColor getColor() {
|
||||
return color;
|
||||
public String getFigure() {
|
||||
return figure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player is ready.
|
||||
*
|
||||
* @return true if ready, false otherwise
|
||||
*/
|
||||
public boolean isReady() {
|
||||
return isReady;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void accept(ClientInterpreter interpreter, int from) {
|
||||
interpreter.received(this, from);
|
||||
|
Reference in New Issue
Block a user