Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
<<set $stepsTaken_Array to []>>
<<set $stepsNeeded_Array = ["HappyLibrarian"]>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["putDown(Adventure, A1);",
"putDown(Adventure, B1);","putDown(Adventure, C1);"]>>\
<<if $step1Visited == null>>\
<<set $step1Visited = true>>\
[img[Images\Day19\GSDay19BG1.png]]
"Ah, welcome back."
<<set _show to { start: 0, end: 3}>>\
<div class='hide' id='next0'>[img[Images\Day19\GSDay19BG2.png]]
"Ready to finally stock these shelves?"</div>
<div class='hide' id='next1'>[img[Images\Day19\GSDay19BG3.png]]
"This will be easy. It seems many of these piles were already sorted. All you have to do is put the correct categories in their corresponding places."</div>
<div class='hide' id='next2'>[img[Images\Day19\GSDay19BG4.png]]
"Shall we start with these? Please <span class='redBold'>putDown(Adventure, A1);</span> to start. Then complete the set."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 1 - 8][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day19\GSDay19BG4.png]]
"Shall we start with these? Please <span class='redBold'>putDown(Adventure, A1);</span> to start. Then complete the set."
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 1 - 8][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 1 - 8][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 1 - 8 Evaluation]]
[[Clear the commands.|Steps 1 - 8][$stepsTaken_Array = []]]
<</if>>\
<</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>>[img[Images\Day15\GSDay15BG36.png]]
"Phew. Thank you. I think I've calmed down a bit."
<<set _show to { start: 0, end: 4}>>\
<div class='hide' id='next0'>[img[Images\Day15\GSDay15BG37.png]]
"Why don't you help me carry these to the Library? Then we can head back to the Dorm."</div>
<div class='hide' id='next1'>[img[Images\Day15\GSDay15BG38.png]]
"Thank you for helping today. I'm sorry I got so mad earlier, I'm sure you kinda just got dragged into that mess."</div>
<div class='hide' id='next2'>[img[Images\Day15\GSDay15BG39.png]]
"Here's a treat to thank you. Hope you like ice cream!"</div>
<div class='hide' id='next3'>[img[Images\Day15\GSDay15BG40.png]]
"Oh... Oh no..."
----
Good job! This lesson's password is: <span class ='whiteBold'>Pearl</span>
Enter it in the Google Forms link!</div><<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 1 - 8][$stepsTaken_Array = []]]
<<else>>\
You flip the book stacks onto each other and then Frisbee toss them neatly onto the shelf.
[[Sorted! Next.|Steps 9 - 12]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<if $step10Visited == null>>\
<<set $step10Visited = true>>\
<<set $stepsNeeded_Array = ["putDown(Fantasy, A2);","putDown(Fantasy, B2);","putDown(Fantasy, C2);"]>>\
[img[Images\Day19\GSDay19BG5.png]]
"Look at that! All in their rightful place. Let's move on."
<<set _show to { start: 0, end: 1}>>\
<div class='hide' id='next0'>[img[Images\Day19\GSDay19BG6.png]]
"Next up is Fantasy. Can you place these as well?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 9 - 12][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day19\GSDay19BG6.png]]
"Next up is Fantasy. Can you place these as well?"
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 9 - 12][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 9 - 12][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 9 - 12 Evaluation]]
[[Clear the commands.|Steps 9 - 12][$stepsTaken_Array = []]]
<</if>>\
<</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 9 - 12][$stepsTaken_Array = []]]
<<else>>\
After lining them up in a neat stack, you casually toss each book into place on their appopriate shelves.
[[Easy job. Gimme more!|Steps 13 - 16]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["putDown(History, D1);",
"putDown(History, D2);","putDown(History, D3);","putDown(History, D4);"]>>\
<<if $step14Visited == null>>\
<<set $step14Visited = true>>\
[img[Images\Day19\GSDay19BG7.png]]
"Spectacular! It seems the pile has shrunk a bit."
<<set _show to { start: 0, end: 1}>>\
<div class='hide' id='next0'> [img[Images\Day19\GSDay19BG8.png]]
"History is next. Please fill in the shelves from top to bottom."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 13 - 16][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day19\GSDay19BG8.png]]
"History is next. Please fill in the shelves from top to bottom."
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 13 - 16][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 13 - 16][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 13 - 16 Evaluation]]
[[Clear the commands.|Steps 13 - 16][$stepsTaken_Array = []]]
<</if>>\
<</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 13 - 16][$stepsTaken_Array = []]]
<<else>>\
You hum a song about ducks as you slot the books into place.
[[Woo-hoo-hoo.|Steps 17 - 18]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["putDown(Horror, A3);",
"putDown(Horror, B3);","putDown(Horror, C3);"]>>\
<<if $step18Visited == null>>\
<<set $step18Visited = true>>\
[img[Images\Day19\GSDay19BG9.png]]
"Sublime. Can you handle Horror next?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 17 - 18][$stepsTaken_Array.push(_commandString)]]
<<else>>
[img[Images\Day19\GSDay19BG9.png]]
"Sublime. Can you handle Horror next?"
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 17 - 18][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 17 - 18][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 17 - 18 Evaluation]]
[[Clear the commands.|Steps 17 - 18][$stepsTaken_Array = []]]
<</if>>\
<</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 17 - 18][$stepsTaken_Array = []]]
<<else>>\
You put the Horror books away with care. They're spooky, after all.
[[How much more...?|Steps 19 - 22]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["putDown(Leisure, E1);",
"putDown(Leisure, E2);","putDown(Leisure, E3);","putDown(Leisure, E4);"]>>\
<<if $step19Visited == null>>\
<<set $step19Visited = true>>\
[img[Images\Day19\GSDay19BG10.png]]
"Admirable work. The pile is almost finished now."
<<set _show to { start: 0, end: 1}>>\
<div class='hide' id='next0'>[img[Images\Day19\GSDay19BG11.png]]
"Please fill in the Leisure shelves."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 19 - 22][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day19\GSDay19BG11.png]]
"Please fill in the Leisure shelves."
<<if _commandLength < $stepsNeeded_Array.length>>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 19 - 22][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 19 - 22][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 19 - 22 Evaluation]]
[[Clear the commands.|Steps 19 - 22][$stepsTaken_Array = []]]
<</if>>\
<</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 19 - 22][$stepsTaken_Array = []]]
<<else>>\
You leisurely put away the Leisure books.
[[Almost there... Right...?|Steps 23 - 24]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<if $step25Visited == null>>\
<<set $step25Visited = true>>\
<<set $stepsNeeded_Array = ["rep(4Down){organize(books,E1);}"]>>\
[img[Images\Day19\GSDay19BG13.png]]
"Breathtaking. You know, I think I may take all of the code I have seen you write and collect it in a Software Library - a collection of procedures that can be used to create new programs."
<<set _show to { start: 0, end: 4}>>\
<div class='hide' id='next0'>[img[Images\Day19\GSDay19BG14.png]]
"Oh, I suppose it was fitting to mention software libraries in the library... Anyway, stay tuned for that in the next class. First we have one more step to take care of here."</div>
<div class='hide' id='next1'>
[img[Images\Day20\GSDay20BG1.png]]
"The books are on the shelves, but none of them are organized. It seems we will need to organize the books on each shelf. Why don't we try combining two concepts?"</div>
<div class='hide' id='next2'>
[img[Images\Day20\GSDay20BG2.png]]
"We can use Selection and Iteration together by creating an algorithm to select a starting position and direction, then use a repeat loop to make one line of code work for multiple shelves."</div>
<div class='hide' id='next3'>
[img[Images\Day20\GSDay20BG3.png]]
"Let me teach you a new command. Try <span class='redBold'>rep (4Down) { organize(books, E1); }</span> "
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 25 - 34 Evaluation][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day20\GSDay20BG3.png]]
"Let me teach you a new command. Try <span class='redBold'>rep (4Down) { organize(books, E1); }</span> "</div>
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 25 - 34 Evaluation][$stepsTaken_Array.push(_commandString)]]
<</if>><<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["putDown(Romance, A4);",
"putDown(Romance, B4);","putDown(Romance, C4);"]>>\
<<if $step23Visited == null>>\
<<set $step23Visited = true>>\
[img[Images\Day19\GSDay19BG12.png]]
"And finally, the Romance shelves."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 23 - 24][$stepsTaken_Array.push(_commandString)]]
<<else>>
[img[Images\Day19\GSDay19BG12.png]]
"And finally, the Romance shelves."
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 23 - 24][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 23 - 24][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 23 - 24 Evaluation]]
[[Clear the commands.|Steps 23 - 24][$stepsTaken_Array = []]]
<</if>>\
<</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 23 - 24][$stepsTaken_Array = []]]
<<else>>\
You smile and put the Romance books away.
[[Done!|Steps 25 - 34]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</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>>\
Password was incorrect.
[[Go back.|PasswordScreen][$stepsTaken_Array = []]]
<<else>>\
[[Click here to continue.|Steps 1 - 8]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\
<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].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 25 - 34][$stepsTaken_Array = []]]
<<else>>\
You sort the books with ease.
[[Done!|Steps 35 - 39]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<if $step35Visited == null>>\
<<set $step35Visited = true>>\
<<set $stepsNeeded_Array = ["rep(4Up){organize(books,A4);}"]>>\
[img[Images\Day20\GSDay20BG4.png]]
"Ta-da! Instead of doing each shelf individually, you can do all 4 shelves in one column this way."
<<set _show to { start: 0, end: 2}>>\
<div class='hide' id='next0'>"Like a normal repeat loop, you will specify the number in the ( ) and the code you want to run in the { } . Make sure to set the position to where you wish to start your loop."</div>
<div class='hide' id='next1'>[img[Images\Day20\GSDay20BG5.png]]
"You also need the <span class='whiteBold'>Direction</span> that you want your repeat loop to move in. Shall we try <span class='redBold'>rep (4Up) { organize(books, A4); }</span> to fill the shelves from the bottom-up this time?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 35 - 39 Evaluation][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day20\GSDay20BG5.png]]
"You also need the <span class='whiteBold'>Direction</span> that you want your repeat loop to move in. Shall we try <span class='redBold'>rep (4Up) { organize(books, A4); }</span> to fill the shelves from the bottom-up this time?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 35 - 39 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 35 - 39][$stepsTaken_Array = []]]
<<else>>\
You sort the column cleanly.
[[Heh, I'm nice.|Steps 40 - 43]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["rep(3Right){organize(books,B1);}"]>>\
<<if $step40Visited == null>>\
<<set $step40Visited = true>>\
[img[Images\Day20\GSDay20BG6.png]]
"Glorious. It appears you are starting to get the hang of it. "
<<set _show to { start: 0, end: 1}>>\
<div class='hide' id='next0'>[img[Images\Day20\GSDay20BG7.png]]
"Now, can you fill in shelves B1, C1, and D1 using a repeat loop that starts from shelf <span class='whiteBold'>B1</span>? Think of which <span class='whiteBold'>Direction</span> you need to move in, and <span class='whiteBold'>how many</span> shelves you need to organize."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 40 - 43 Evaluation][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day20\GSDay20BG7.png]]
"Now, can you fill in shelves B1, C1, and D1 using a repeat loop that starts from shelf <span class='whiteBold'>B1</span>? Think of which <span class='whiteBold'>Direction</span> you need to move in, and <span class='whiteBold'>how many</span> shelves you need to organize."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 40 - 43 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 40 - 43][$stepsTaken_Array = []]]
<<else>>\
You sort the column cleanly.
[[Cool.|Steps 44 - 45]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["rep(3Left){organize(books,D2);}"]>>\
<<if $step16Visited == null>>\
<<set $step16Visited = true>>\
[img[Images\Day20\GSDay20BG8.png]]
"Stellar. Can you organize the books one row lower, but in the opposite direction?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 44 - 45 Evaluation][$stepsTaken_Array.push(_commandString)]]
<<else>>
[img[Images\Day20\GSDay20BG8.png]]
"Stellar. Can you organize the books one row lower, but in the opposite direction?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 44 - 45 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 44 - 45][$stepsTaken_Array = []]]
<<else>>\
You run your hand across the targeted shelves and sort everything.
[[Heh. I've mastered this power.|Steps 46 - 49]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["organize(books,B3);",
"organize(books,C4);","organize(books,D3);"]>>\
<<if $step46Visited == null>>\
<<set $step46Visited = true>>\
[img[Images\Day20\GSDay20BG9.png]]
Smashing. I think you are really starting to get a firm handle on this. Great job!"
<<set _show to { start: 0, end: 1}>>\
<div class='hide' id='next0'>[img[Images\Day20\GSDay20BG10.png]]
"Time to handle the last few shelves. This time, see if you recall how to fill in shelves individually. You can use 3 individual commands this time."
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 46 - 49][$stepsTaken_Array.push(_commandString)]]</div>
<<else>>
[img[Images\Day20\GSDay20BG10.png]]
"Time to handle the last few shelves. This time, see if you recall how to fill in shelves individually. You can use 3 individual commands this time."
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 46 - 49][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 46 - 49][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 46 - 49 Evaluation]]
[[Clear the commands.|Steps 46 - 49][$stepsTaken_Array = []]]
<</if>>\
<</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 46 - 49][$stepsTaken_Array = []]]
<<else>>\
A flick of the wrist, and the sort of the books.
[[Pretty cool, huh?|Steps 50 - 51]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\<<set _commandLength = $stepsTaken_Array.length>>\
<<set $stepsNeeded_Array = ["organize(books,B4);",
"organize(books,C3);","organize(books,D4);"]>>\
<<if $step50Visited == null>>\
<<set $step50Visited = true>>\
[img[Images\Day20\GSDay20BG11.png]]
"Bravo! You realized that there was no need for a repeat loop! Shall we finish up with the final set?"
<label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 50 - 51][$stepsTaken_Array.push(_commandString)]]
<<else>>
[img[Images\Day20\GSDay20BG11.png]]
"Bravo! You realized that there was no need for a repeat loop! Shall we finish up with the final set?"
<<if _commandLength < $stepsNeeded_Array.length>><label>Enter a command. <<textbox "_commandString" "">></label>
[[Enter command.|Steps 50 - 51][$stepsTaken_Array.push(_commandString)]]
[[Clear the commands.|Steps 50 - 51][$stepsTaken_Array = []]]
<</if>>\
<<if _commandLength >= $stepsNeeded_Array.length>>\
[[Check solution.|Steps 50 - 51 Evaluation]]
[[Clear the commands.|Steps 50 - 51][$stepsTaken_Array = []]]
<</if>>\
<</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>>[img[Images\Day20\GSDay20BG12.png]]
"Heavenly. Look at this place. It is majestic. You really did an amazing job here, truly."
<<set _show to { start: 0, end: 3}>>\
<div class='hide' id='next0'>[img[Images\Day20\GSDay20BG13.png]]
"Look at that, I can plainly see where to return the borrowed book. Thank you again!"</div>
<div class='hide' id='next1'>"What? Why do I still have a tail? Oh, well I grew it out when we were trying to tame the animals the other day. I think I'll keep it."</div>
<div class='hide' id='next2'>"Now I should really go find that librarian so I can check out that next issue. Take care!"</div><<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 50 - 51][$stepsTaken_Array = []]]
<<else>>\
You smile and do another sort-sweep.
[[And that, as they say, is that.|Steps 52 - 57]]
<<set $stepsNeeded_Array = []>>
<<set $stepsTaken_Array = []>>
<</if>>\