package pp.monopoly.message.client;

/**
 * Represents a request from a player to buy a property.
 */
public class BuyPropertyRequest extends ClientMessage{
    private int propertyId;

    /**
     * Constructs a BuyPropertyRequest with the specified property ID.
     *
     * @param propertyId the ID of the property to buy
     */
    public BuyPropertyRequest(int propertyId) {
        this.propertyId = propertyId;
    }

    /**
     * Gets the ID of the property to buy.
     *
     * @return the property ID
     */
    public int getPropertyId() {
        return propertyId;
    }

    @Override
    public void accept(ClientInterpreter interpreter, int from) {
        interpreter.received(this, from);
    }
}
