package macampcorp.macamp.game.scheduler;

import macampcorp.macamp.activities.HostActivity;
import macampcorp.macamp.game.Game;
import macampcorp.macamp.game.challenges.Challenge;

public class ChallengeTask extends Task {

    protected Challenge mChallenge;


    public String toString()
    {
        return "[ Challenge, '"+mChallenge.getType()+"',  '"+mChallenge.getName()+"' ]";
    }

    public ChallengeTask(Challenge g) {
        super(TASK_CHALLENGE);
        mChallenge = g;
    }

    @Override
    public int exec(Scheduler s, HostActivity cd, Game g) {
        mChallenge.exec(g, cd);
        return TASK_CHALLENGE;
    }

    public Challenge getChallenge() {
        return mChallenge;
    }
}
