package pp.monopoly.message.client;

import pp.monopoly.model.TradeHandler;

/**
 * Represents a trade Request message from one player to another.
 */
public class TradeOffer extends ClientMessage{
    private int receiverId;
    private TradeHandler tradehandler;


    /**
     * Constructs a TradeOffer with the specified details.
     *
     * @param receiverId the ID of the player receiving the Request
     * @param tradehandler the tradehandler
     */
    public TradeOffer(int receiverId, TradeHandler tradehandler) {
        this.receiverId = receiverId;
        this.tradehandler = tradehandler;
    }

    public int getReceiverId() { return receiverId; }
    public TradeHandler getTradeHandler() { return tradehandler; }

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

}
