package macampcorp.macamp.game.scheduler;

import macampcorp.macamp.activities.HostActivity;
import macampcorp.macamp.game.Game;
import macampcorp.macamp.game.Resource;

public class ResourceTask extends Task {

    protected Resource mResource;

    public ResourceTask(Resource r) {
        super(TASK_RESOURCE);
        mResource =r;
    }


    public String toString()
    {
        return "[ Resource, '"+mResource.getName()+"' ]";
    }

    @Override
    public int exec(Scheduler s, HostActivity cd, Game g) {
        cd.startResource(mResource);
        return TASK_RESOURCE;
    }

    public Resource getResource() {
        return mResource;
    }
}
