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{
    private boolean isReady;
    private String name;
    private PlayerColor color;

    /**
     * Constructs a PlayerReady message.
     *
     * @param isReady true if the player is ready, false otherwise
     */
    public PlayerReady(boolean isReady) {
        this.isReady = isReady;
    }

    /**
     * Getter for the Name
     * @return the Name
     */
    public String getName() {
        return name;
    }

    /**
     * Getter for the Playercolor
     * @return the Playercolor
     */
    public PlayerColor getColor() {
        return color;
    }

    /**
     * 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);
    }
}
