/*
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package macampcorp.macamp.game.challenges;

import android.app.Activity;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;

import macampcorp.macamp.activities.fragments.BombFragment;
import macampcorp.macamp.activities.fragments.QCMFragment;
import macampcorp.macamp.exceptions.BadChallengeConfigException;
import macampcorp.macamp.game.Game;

public class BombDefuse extends Challenge {

    protected String mText;

    public BombDefuse(Game g, JSONObject root, Activity act) {
        super(g, root,  BombFragment.class, act);
        mStartWith= BombFragment.class;
        try {
            mText = root.getString("text");
        }catch(JSONException e)
        {
            e.printStackTrace();
            throw new RuntimeException("Error BombDefuse: bad parameter 'text' :  "+e.getMessage());
        }
    }

    public static final int REQUEST_CODE=1900;

    public int getResultCode() { return REQUEST_CODE; }

    public  String getmText() { return mText;}
}
