define(['questAPI'], function(quest){ var API = new quest(); /** Question-prototypes **/ API.addQuestionsSet('basicSelect', { type: 'selectOne', style:'multiButtons', autoSubmit:true, numericValues:true, required:false, errorMsg: { required: "Please select an answer, or click 'decline to answer'" } }); // each stim API.addQuestionsSet('infoQuest', [ { inherit : 'basicSelect', name : 'infoQuest', stem : '
'+
"
Get Ready to Play!"+
"
Now, you will play the Nourishment Game. Remember:"+
"
(1) You’ll begin the game " + API.getGlobal().negState[0] + " and " + API.getGlobal().posState[0] + "."+
"
(2) Your goal is to maintain optimal levels of " + API.getGlobal().rewardLabels2[0] + " and " + API.getGlobal().rewardLabels2[1] + " by keeping both as close as possible to 50."+
"
(3) Eating food increases your food level by 1 and decreases your water level by 1. Drinking beverages increases your water level by 1 and decreases your food level by 1."+
"
(4) You must discover which type of token activates the " + API.getGlobal().colors[0][1] + " machine (which dispenses " + API.getGlobal().rewardLabels2[0] + "), and which type of token activates the " + API.getGlobal().colors[1][1] + " machine (which dispenses " + API.getGlobal().rewardLabels2[1] + ")."+
"
The game will take no more than 3 minutes to complete. Please continue when you are ready to play."+
"
",
onLoad: function(log, current) {
// hide continue button
document.querySelector('#minno-app > div > div.ng-scope.ng-isolate-scope > div > div > div.page-buttons > button').style.visibility = "hidden";
var delayInMilliseconds = 5000;
setTimeout(function() {
//this code will be executed after 5 seconds
document.querySelector('#minno-app > div > div.ng-scope.ng-isolate-scope > div > div > div.page-buttons > button').style.visibility = "visible";
}, delayInMilliseconds);
} // function ends
}
]);
/**
Pages
**/
API.addPagesSet('basicPage',
{
decline:false,
v1style:2,
numbered: false,
noSubmit:false, //Change to true if you don't want to show the submit button.
submitText: "Continue"
});
/**
Sequence
**/
API.addSequence(
[
{inherit : 'basicPage',
questions : {inherit:{set:'infoQuest'}}}
]);
return API.script;
});