Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
<<set $stepsTaken_Array to []>>
<<set $stepsNeeded_Array to ["VarsitySquad"]>><<set $stepsNeeded_Array to ["score();"]>>\
<<if $Step1Visited == null>>\
<<set $Step1Visited = true>>\
<<set _show to { start: 0, end: 4 }>>\
<<set _commandLength = $stepsTaken_Array.length>>\
[img[Images\Day8\GSDay8BG1.png]]
"ABOUT TIME. I've been getting the Gym all set up for us today."
<div class='hide' id='next0'>
"UNFORTUNATELY there still aren't any hoops or balls for us to use... so I had to get creative. Today you'll run through an obstacle course!!!</div>
<div class='hide' id='next1'>
"YOUR GOAL: <span class='blueBold'>pickUp();</span> the scattered <span class='whiteBold'>lightbulbs</span> around the gym and make it to the end of the obstacle course to score points. You'll know you did it right if the bulbs light up."
</div>
<div class='hide' id='next2'>"WHAT??? You don't want to do all those steps with the ladder again??? OH, why don't you use a Procedure - a block of code that can actually be stored in one line of code."
</div>
<div class='hide' id='next3'>
[img[Images\Day8\GSDay8BG2.png]]
"HERE, try for yourself. <span class='redBold'>score();</span> will let you climb the ladder, change the bulb, and climb back down the ladder all in one move. Try it!!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 1 - 8 Evaluation][$stepsTaken_Array.push(_commandString)]]
</div>\
<<else>>\
[img[Images\Day8\GSDay8BG2.png]]
"HERE, try for yourself. <span class='redBold'>score();</span> will let you climb the ladder, change the bulb, and climb back down the ladder all in one move. Try it!!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 1 - 8 Evaluation][$stepsTaken_Array.push(_commandString)]]
<</if>>\
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i] == $stepsNeeded_Array[_i]>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 1 - 8][$stepsTaken_Array = []]]
<<else>>\
You did all that in one command.
[[One command to rule them all.|Steps 9 - 14]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(8) {jumpRight();}","pickUp();"]>>\
<<set _commandLength = $stepsTaken_Array.length>>\
<<if $Step9Visited == null>>\
<<set $Step9Visited = true>>\
<<set _show to { start: 0, end: 2 }>>\
[img[Images\Day8\GSDay8BG3.png]]
"EASY, right??? Okay time to shine."
<div class='hide' id='next0'>
[img[Images\Day8\GSDay8BG4.png]]
"OKAY, so here's the basic layout. Again, you need to <span class='blueBold'>pickUp();</span> the <span class='whiteBold'>lightbulbs</span> you find on the floor, make your way to the <span class='whiteBold'>ladder</span>, and then <span class='redBold'>score();</span> . Ready???"
</div>
<div class='hide' id='next1'>
[img[Images\Day8\GSDay8BG5.png]]
"<span class='whiteBold'>JUMP JUMP JUMP</span>!!! Count your <span class='redBold'>rep( ) { }</span> !!! And remember to <span class='blueBold'>pickUp(lightbulb);</span> when you're done <span class='whiteBold'>jumping</span>!!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 9 - 14][$stepsTaken_Array.push(_commandString)]]
</div>
<<else>>\
[img[Images\Day8\GSDay8BG5.png]]
"<span class='whiteBold'>JUMP JUMP JUMP</span>!!! Count your <span class='redBold'>rep( ) { }</span> !!! And remember to <span class='blueBold'>pickUp();</span> the lightbulb when you're done <span class='whiteBold'>jumping</span>!!!"
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 9 - 14][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 9 - 14][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 9 - 14 Evaluation]]
[[Clear the commands.|Steps 9 - 14][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength > 0>>\
Current commands:
<<for _i to 0; _i < _commandLength; _i ++>>\
<<if $stepsTaken_Array[_i] != "" && $stepsTaken_Array[_i] != " ">>\
<<print $stepsTaken_Array[_i]>>
<<else>>\
Blank Command
<</if>>\
<</for>>
<</if>>
<</if>><<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 9 - 14][$stepsTaken_Array = []]]
<<else>>\
"Repeat" saved you some work. You got it.
[[Easy.|Steps 15 - 16]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(5) {moveUp();}","pickUp();"]>>\
<<set _commandLength = $stepsTaken_Array.length>>\
[img[Images\Day8\GSDay8BG6.png]]
"WOW... I really thought you were going to break that bulb by jumping on it. Way to stick the landing. Okay move and pick up the next bulb. Move with <span class='redBold'>rep( ) { }</span> !!!"
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 15 - 16][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 15 - 16][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 15 - 16 Evaluation]]
[[Clear the commands.|Steps 15 - 16][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength > 0>>\
Current commands:
<<for _i to 0; _i < _commandLength; _i ++>>\
<<if $stepsTaken_Array[_i] != "" && $stepsTaken_Array[_i] != " ">>\
<<print $stepsTaken_Array[_i]>>
<<else>>\
Blank Command
<</if>>\
<</for>>
<</if>>
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 15 - 16][$stepsTaken_Array = []]]
<<else>>\
You feel great doing that.
[[I know I got this.|Steps 17 - 19]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(2) {moveLeft(); jumpLeft(); moveLeft();}","score();"]>>\
<<set _commandLength = $stepsTaken_Array.length>>\
<<if $Step17Visited == null>>\
<<set $Step17Visited = true>>\
<<set _show to { start: 0, end: 1 }>>\
[img[Images\Day8\GSDay8BG7.png]]
"THAT was a gimme. This next one is harder. I won't tell you how many <span class='redBold'>rep( ) { }</span> you should do today. Then it wouldn't be a challenge."
<div class='hide' id='next0'>
"REMEMBER!!! You need to <span class='whiteBold'>move onto the chair</span> first before you can <span class='whiteBold'>jump</span> off of it. And using the chair lets you <span class='whiteBold'>jump further</span>. Try to <span class='redBold'>score();</span> !!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 17 - 19][$stepsTaken_Array.push(_commandString)]]
</div>
<<else>>\
[img[Images\Day8\GSDay8BG7.png]]
"REMEMBER!!! You need to <span class='whiteBold'>move onto the chair</span> first before you can <span class='whiteBold'>jump</span> off of it. And using the chair lets you <span class='whiteBold'>jump further</span>. Try to <span class='redBold'>score();</span> !!!"
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 17 - 19][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 17 - 19][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 17 - 19 Evaluation]]
[[Clear the commands.|Steps 17 - 19][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength > 0>>\
Current commands:
<<for _i to 0; _i < _commandLength; _i ++>>\
<<if $stepsTaken_Array[_i] != "" && $stepsTaken_Array[_i] != " ">>\
<<print $stepsTaken_Array[_i]>>
<<else>>\
Blank Command
<</if>>\
<</for>>
<</if>>
<</if>><<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 17 - 19][$stepsTaken_Array = []]]
<<else>>\
Great work!
[[Liked that move, I bet.|Steps 20 - 23]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(2) {jumpLeft();}"]>>\
<<if $Step20Visited == null>>\
<<set $Step20Visited = true>>\
<<set _show to { start: 0, end: 1 }>>\
<<set _commandLength = $stepsTaken_Array.length>>\
[img[Images\Day8\GSDay8BG8.png]]
"NICE!!! I'm impressed you got that. We're not done yet though..."
<div class='hide' id='next0'>
[img[Images\Day8\GSDay8BG9.png]]
"<span class='whiteBold'>MOVE</span> IT. And I don't care if it's just <span class='whiteBold'>two jumps</span>, don't even THINK about not doing your <span class='redBold'>rep( ) { }</span> !!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 20 - 23 Evaluation][$stepsTaken_Array.push(_commandString)]]
</div>\
<<else>>\
[img[Images\Day8\GSDay8BG9.png]]
"<span class='whiteBold'>MOVE</span> IT. And I don't care if it's just <span class='whiteBold'>two jumps</span>, don't even THINK about not doing your <span class='redBold'>rep( ) { }</span> !!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 20 - 23 Evaluation][$stepsTaken_Array.push(_commandString)]]
<</if>>\
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 20 - 23][$stepsTaken_Array = []]]
<<else>>\
You got this. It works.
[[Easy.|Steps 24 - 25]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(3) {jumpRight(); pickUp(); jumpRight();}","score();"]>>\
<<set _commandLength = $stepsTaken_Array.length>>\
<<set _show to { start: 0, end: 0 }>>\
[img[Images\Day8\GSDay8BG10.png]]
"GOOD. Same drill as before. <span class='whiteBold'>Grab those bulbs</span> and <span class='redBold'>score();</span> !!!"
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 24 - 25][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 24 - 25][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 24 - 25 Evaluation]]
[[Clear the commands.|Steps 24 - 25][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength > 0>>\
Current commands:
<<for _i to 0; _i < _commandLength; _i ++>>\
<<if $stepsTaken_Array[_i] != "" && $stepsTaken_Array[_i] != " ">>\
<<print $stepsTaken_Array[_i]>>
<<else>>\
Blank Command
<</if>>\
<</for>>
<</if>>
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 24 - 25][$stepsTaken_Array = []]]
<<else>>\
Great work! You've picked up all of those bulbs and fixed it.
[[Many jumps, lot of PE I guess.|Steps 26 - 29]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(2) {jumpLeft();}"]>>\
<<if $Step26Visited == null>>\
<<set $Step26Visited = true>>\
<<set _show to { start: 0, end: 1 }>>\
<<set _commandLength = $stepsTaken_Array.length>>\
[img[Images\Day8\GSDay8BG11.png]]
"HOW are you not breaking those bulbs every time you land on them???"
<div class='hide' id='next0'>
[img[Images\Day8\GSDay8BG12.png]]
"ALRIGHT, jump back over here. <span class='whiteBold'>REPS</span> ONLY!!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 26 - 29 Evaluation][$stepsTaken_Array.push(_commandString)]]
</div>\
<<else>>\
[img[Images\Day8\GSDay8BG12.png]]
"ALRIGHT, jump back over here. <span class='whiteBold'>REPS</span> ONLY!!!"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 26 - 29 Evaluation][$stepsTaken_Array.push(_commandString)]]
<</if>>\
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 26 - 29][$stepsTaken_Array = []]]
<<else>>\
It works! You went back.
[[Back to the future.|Steps 30 - 31]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to ["rep(2) {moveRight(); moveRight(); moveDown(); moveDown();}","pickUp();","rep(2) {jumpLeft(); moveLeft(); moveLeft(); jumpLeft();}","rep(2) {jumpUp(); moveRight(); jumpRight();}","score();"]>>\
<<set _commandLength = $stepsTaken_Array.length>>\
<<set _show to { start: 0, end: 0 }>>\
[img[Images\Day8\GSDay8BG13.png]]
"THIS IS IT!!! You've been training for it this whole week. I wanna see you use <span class='whiteBold'>THREE SEPARATE REPEAT LOOPS</span> to solve this!!! And don't forget to <span class='blueBold'>pickUp();</span> the bulb you need to <span class='redBold'>score();</span> !!!"
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 30 - 31][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 30 - 31][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 30 - 31 Evaluation]]
[[Clear the commands.|Steps 30 - 31][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength > 0>>\
Current commands:
<<for _i to 0; _i < _commandLength; _i ++>>\
<<if $stepsTaken_Array[_i] != "" && $stepsTaken_Array[_i] != " ">>\
<<print $stepsTaken_Array[_i]>>
<<else>>\
Blank Command
<</if>>\
<</for>>
<</if>>
<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i].replace(/\s/g,'') == $stepsNeeded_Array[_i].replace(/\s/g,'')>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Looks like you had an error somewhere. Try it again.
[[Go back.|Steps 30 - 31][$stepsTaken_Array = []]]
<<else>>\
Great work! But you heard "Creeeeek" from the ladder.
[[Oops.|Steps 32 - 50]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set $stepsNeeded_Array to [""]>>\
<<set $Step1Visited = true>>\
<<set _show to { start: 0, end: 10 }>>\
<<set _commandLength = $stepsTaken_Array.length>>\
[img[Images\Day8\GSDay8BG14.png]]
"Aiiiiiiiiiiieeeeeeeeeeeeeeeeeee... "
<div class='hide' id='next0'>
[img[Images\Day8\GSDay8BG15.png]]
"The LADDER broke? Seriously?"
</div>
<div class='hide' id='next1'>
"WELP, that's as good a place as any to stop."
</div>
<div class='hide' id='next2'>
[img[Images\Day8\GSDay8BG16.png]]
FANTASTIC work this week kid. You've really got these old bones feeling alive again. You know, figuratively speaking."
</div>
<div class='hide' id='next3'>
"Hey uh... about the ladder and all those books we were using... can you do me a solid-"
</div>
<div class='hide' id='next4'>
[img[Images\Day8\GSDay8BG17.png]]
"AGH!!!"
</div>
<div class='hide' id='next5'>
[img[Images\Day8\GSDay8BG18.png]]
"Sorry kid, gotta go!!!"
</div>
<div class='hide' id='next6'>
[img[Images\Day8\GSDay8BG19.png]]
"..."
</div>
<div class='hide' id='next7'>
[img[Images\Day8\GSDay8BG20.png]]
"How am I supposed to finish my series if I can't even get into the Library? That's the last time I lend anyone my key."
</div>
<div class='hide' id='next8'>
[img[Images\Day8\GSDay8BG21.png]]
"I could have sworn I saw that striped hat..."
</div>
<div class='hide' id='next9'>
[img[Images\Day8\GSDay8BG22.png]]
"Oh, hi there. Have you come to check out a book? I would be happy to help, but I'm afraid I won't be able to unlock the Library until after the weekend. Why don't you come back later?"
</div>
<label>Enter the password for today's class. <<textbox "_commandString" "">></label>
[[Enter command.|PasswordCheck][$stepsTaken_Array.push(_commandString)]]<<set _gotIt = true>>\
<<for _i to 0; _i < $stepsTaken_Array.length; _i ++>>\
<<set _gotIt = $stepsTaken_Array[_i] == $stepsNeeded_Array[_i]>>\
<<if _gotIt == false>>\
<<break>>
<</if>>\
<</for>>\
<<if _gotIt == false>>\
Password was incorrect.
[[Go back.|PasswordScreen][$stepsTaken_Array = []]]
<<else>>\
[[Click here to continue.|Steps 1 - 8]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\