package de.frajul.endlessroll.entities.shapes;

import android.content.Context;

import de.frajul.endlessroll.levels.LevelManager;

/**
 * Created by Julian on 29.10.2017.
 */

public abstract class Task {

    protected int condition;
    protected boolean conditionFulfilled;

    public Task(int condition) {
        this.condition = condition;
    }

    public void update(LevelManager levelManager){
        conditionFulfilled = checkConditionFulfilled(levelManager);
    }

    protected abstract boolean checkConditionFulfilled(LevelManager levelManager);

    public abstract String toString(Context context, LevelManager levelManager);

    public boolean isConditionFulfilled() {
        return conditionFulfilled;
    }
}
