package app.mar.game.scheduler;

import app.mar.activities.ChallengeDriver;
import app.mar.game.Game;
import app.mar.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, ChallengeDriver cd, Game g) {
        mChallenge.exec(g, cd);
        return TASK_CHALLENGE;
    }

    public Challenge getChallenge() {
        return mChallenge;
    }
}
