constEVEN_LENGTH_TEST=1;//Only generate even length tapes.
@ -210,9 +213,9 @@ var KEY_BRIDGED_BELT = ["Shift"]
varCONVEYOR_BUILD_BUTTON={img:ID_CONVEYOR,x:-1,y:-1,w:-1,h:-1,lastselected:DEF_CONVEYOR,tooltip:"Conveyor Belt\nMoves bots in a direction.\n\nHold (Shift) to bridge over other belts",mobileTooltip:"Conveyor Belt\nMoves bots in a direction.\n\nHold button down to toggle bridge mode.\nUsed to bridge over other belts"}
varBRANCH_BUILD_BUTTON={img:ID_BRANCH,x:-1,y:-1,w:-1,h:-1,submenu_buttons:[DEF_BRANCHUP_RB,DEF_BRANCHUP_BR,DEF_BRANCHUP_GY,DEF_BRANCHUP_YG,DEF_BRANCHUP_PPI,DEF_BRANCHUP_PIP,DEF_BRANCHUP_BLGR,DEF_BRANCHUP_GRBL],lastselected:undefined,default:DEF_BRANCHUP_RB,tooltip:"Branch\nReads next tape and moves bot in the\nmatching color direction.\n\nMoves bot forward and does not consume\ntape if no match found."}
varWRITER_BUILD_BUTTON={img:ID_WRITER,x:-1,y:-1,w:-1,h:-1,submenu_buttons:[DEF_WRITERRIGHT_R,DEF_WRITERRIGHT_B,DEF_WRITERRIGHT_G,DEF_WRITERRIGHT_Y,DEF_WRITERRIGHT_P,DEF_WRITERRIGHT_PI,DEF_WRITERRIGHT_BL,DEF_WRITERRIGHT_GR],lastselected:undefined,default:DEF_WRITERRIGHT_R,tooltip:"Writer\nWrites a color to the end of the tape."}
objective:"To convert your robots, you must send them from the entrance to the exit. Select a belt and send robots to where they truly belong.",
objective:"To convert your robots, you must send them from the entrance to the exit. Select a belt and send robots to where they truly belong. Press the Play button to test your machine!",
level:createGrid(5,5,4,2),
start:{x:0,y:2},
locked:[BRANCH_BUILD_BUTTON,WRITER_BUILD_BUTTON],
tutorial:true,
accept:(tape)=>{
returntrue;
}
}
},
generator:ONE_TEST
}
varTUTORIAL2={
name:"Branches",
objective:"We have to make sure we are sending robots that meet our needs! Use the branch to filter out robots that start with a red signal. Send only those to the exit!",
@ -629,7 +647,7 @@ function decideIfWrongBot(isSupposedToBeAccepted,tape) {
}
}
functiongenerateBotQueue(generator=NORMAL_TEST){
functiongenerateBotQueue(){
BOT_QUEUE=[]
RESULT=true
TESTSTEPS=0
@ -639,6 +657,12 @@ function generateBotQueue(generator=NORMAL_TEST) {
varMAX_VALUE=1000
varstartingValue=0
vartests=[]
vargenerator
if(gameStage.generator!==undefined){
generator=gameStage.generator
}else{
generator=NORMAL_TEST
}
switch(generator){
caseEVEN_LENGTH_TEST:{
while(tests.length<2000){
@ -648,7 +672,10 @@ function generateBotQueue(generator=NORMAL_TEST) {