package pp.monopoly.message.server;

import pp.monopoly.model.TradeHandler;

/**
 * Represents a response to a trade offer.
 */
public class TradeReply extends ServerMessage{
    private int initiatorId;
    private TradeHandler tradeHandler;

    /**
     * Constructs a TradeResponse with the specified response details.
     *
     * @param initiatorId the ID of the player who initiated the trade
     * @param accepted true if the offer is accepted, false if declined
     */
    public TradeReply(int initiatorId, TradeHandler tradeHandler) {
        this.initiatorId = initiatorId;
        this.tradeHandler = tradeHandler;
    }

    public int getInitiatorId() { return initiatorId; }
    public TradeHandler getTradeHandler() {
        return tradeHandler;
    }

    @Override
    public void accept(ServerInterpreter interpreter) {
        interpreter.received(this);
    }

    @Override
    public String getInfoTextKey() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'getInfoTextKey'");
    }

}
