package it.polimi.ingsw.gc14.Network.NetworkEvents;

import it.polimi.ingsw.gc14.Controller.GameController;
import it.polimi.ingsw.gc14.Network.EventType;
import it.polimi.ingsw.gc14.Network.NetworkEvent;
import it.polimi.ingsw.gc14.View.IView;

import java.io.Serializable;

public class DrawLowerBuildingCard extends NetworkEvent implements  Serializable{
    private int pos;

    public DrawLowerBuildingCard(String username, int pos){
        super(username, EventType.DRAW_LOWER_BUILD, false);
        this.pos = pos;
    }

    @Override
    public boolean apply(GameController gameController){
        return gameController.drawLowerBuildingCard(username, pos);
    }

    public String apply(IView gameController){
        return gameController.toString();
    }
}
