// Get two secret true/false values from the wizard.
hero.moveXY(14, 24);
var secretA = hero.findNearestFriend().getSecretA();
var secretB = hero.findNearestFriend().getSecretB();
// If BOTH secretA and secretB are true, take the high path; otherwise, take the low path.
// Check the guide for notes on how to write logical expressions.
var secretC = secretA && secretB;
if (secretC)
hero.moveXY(20, 33);
else
hero.moveXY(20, 15);
hero.moveXY(26, 24);
// If EITHER secretA or secretB is true, take the high path.
if (secretA === true || secretB === true) {
hero.moveXY(32, 33);
// If secretB is NOT true, take the high path.
}else{
if (secretB !== true) {
hero.moveXY(32, 33);
}
}
hero.moveXY(38,24);
hero.moveXY(44, 15);
hero.moveXY(50,24);
Alright so I got part way through okie dokie and then the instructions just kind of tailed off… I decided to continue through the points with hero.moveXY, I’m pretty sure I can keep repeating the true or false equation until I get to the end (going to try that now) but why do the instructions just trail off? (I got mission success for this) (Javascript)
::edit:: I tried rematching the true false parameter to move ahead and it didn’t work. (Also it doesn’t make sense the first string tells me no matter the answer go north)
hero.moveXY(14, 24)
secretA = hero.findNearestFriend().getSecretA()
secretB = hero.findNearestFriend().getSecretB()
# If BOTH secretA and secretB are true, take the high path; otherwise, take the low path.
secretC = secretA and secretB
if secretC:
hero.moveXY(20, 33)
else:
hero.moveXY(20, 15)
hero.moveXY(26, 24)
# If EITHER secretA or secretB is true, take the high path.
if secretA:
hero.moveXY(32, 15)
else:
hero.moveXY(32, 33)
hero.moveXY(38, 24)
# If secretB is NOT true, take the high path.
if secretB:
hero.moveXY(44, 15)
else:
hero.moveXY(44, 33)
hero.moveXY(50, 24)
# If EITHER secretA or secretB is true, take the high path.
# If secretB is NOT true, take the high path.
You need to format your if conditional statements as per the instructions. The first one, the one that was already done, is an example of how to do the next two.
Please do not post solutions. Feel free to post your non-working code when asking for assistance, but no final solutions are allow on this board. Thanks.
# Get two secret true/false values from the wizard.
# Check the guide for notes on how to write logical expressions.
hero.moveXY(14, 24)
secretA = hero.findNearestFriend().getSecretA()
secretB = hero.findNearestFriend().getSecretB()
# If BOTH secretA and secretB are true, take the high path; otherwise, take the low path.
secretC = secretA and secretB
if secretC:
hero.moveXY(20, 33)
else:
hero.moveXY(20, 15)
hero.moveXY(26, 24)
# If EITHER secretA or secretB is true, take the high path.
if secretA and secretB == True:
hero.moveXY(32, 33)
hero.moveXY(38, 24)
# If secretB is NOT true, take the high path.
if secretB == False:
hero.moveXY(32, 33)
hero.moveXY(44, 24)
hero.moveXY(50, 24)
hero.moveXY(50, 24)