<snapdata remixID="14940207"><project name="U3L1-Tic-Tac-Toe Setup" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAALxklEQVR4Aeyce3AVVx3HvzcJeRQICXmRQDrh/UolfzAghNDwKK+qZAJoh3akyIAitmqrDGMdlJnW8lBHCh2tM4zD2EHaOgw6QO04pFqrQngUkkAhBQSCkQTyIO+kebjfH268S+o1zb032bv7A357zp7d8zvn9/195uzdvXcJ69I/qsAAKhAG/aMKDKACCuAAiq9DAwqgUjCgCnwigFVVVSgtLe13q6urG1AxdPD+V8ACYGtrKwoLC9HY2Ijo6Oh+t9raWhmf8+h/KXTEgVDAAmBJSQmSk5PR2dmJw4cPo729XepmyXbTDhw4gMjISDlutgWi5PhnzpwJvhY6gi0UsABYUVEB445c7MiRI1i7di22bduGTZs2Yfv27VKybdeuXbJSRUVFyblmn0CVXAltoY5OIugKWAD0XsFmzpyJpUuXYvr06Vi4cCGmTJmCFStWYPPmzcjJyUFeXp5MzrtPIOviXDeOV8ACoPcKtmbNGqxcuRKLFy/G8uXLsWzZMsydOxfjx48XKGfPng3erHj3CWTd8cprgKKABUCuYCZE9dc+wId71+PiK+uCbpdeXY+Hwtq7L+ech8xON45XwAIg4WPyabeOvYp5UVcR/5l5SF69A1nf+XVAbcqz+xC/6kWMTolFbuRVeApf776h4Twcr7wGKAr0AJDJF+vsQsmY1Uhf+DRGjBghcPztx8/j3Scye21tJe/j3r17cqnm5bqmpkb81NfXg/WOjg7U5W5B+aBR3aufjN3VJZPTTVAUsJVTC4Bc+QgAS86yalQO+HCYzwXZ1nr6HXzumRfEZiVG4EGbn5NtaYu/V4aWlhbExsaKtbW1CYApKSnyrPHu3bvg3XZbWha6jL8cw3t8zkHN2QpYADSTz5JhE4jBgwcjLCxMwGFbTGY2utpakLZlP0Y89xqSN2xH+vZjSPzyViSs3oIRz/8SyV/dwVPF6Ovky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bh/42jpuens5pqLlEgR4AuiRuDdMmCjgXQJsIrNPwrYAC6FsfPRpkBRTAIAus7n0roAD61kePBlkBBTDIAqt73woogL710aNBVkABDLLAA+A+pIZUAEMqXc6brALovJyGVEQKYEily3mTVQCdl9OQikgBDKl0OW+yCqDzchpSEQUUwJCKXCdrCwUUQFukwb2TUADdm3tbRK4A2iIN7p2EAuje3NsicgXQFmlw7yQUwIDkXp30VQEFsK/Kab+AKKAABkRGddJXBRTAviqn/QKigAIYEBnVSV8VUAD7qpz2C4gCCmBAZHSvE38jVwD9VVD7+6WAAuiXfNrZXwUUQH8V1P5+KaAA+iWfdvZXAQXQXwW1v18KKIB+yaed/VUgdAH0N3LtbwsFFEBbpMG9k1AA3Zt7W0SuANoiDe6dhALo3tzbInIF0BZpcO8kFMDQy72jZqwAOiqdoReMAhh6OXPUjBVAR6Uz9IJRAEMvZ46asQLoqHSGXjAKYOjlzFEz/lQAOipyDcYWCiiAtkiDeyehALo397aIXAG0RRrcOwkF0L25t0XkCqAt0uDeSSiAvcq9nhQsBRTAYCmrfnulgALYK5n0pGApoAAGS1n12ysFFMBeyaQnBUsBBTBYyqrfXimgAPZKJveeFOzIFcBgK6z+fSqgAPqURw8GWwEFMNgKq3+fCiiAPuXRg8FWQAEMtsLq36cCCqBPefRgsBWwL4DBjlz920IBBdAWaXDvJBRA9+beFpErgLZIg3snoQC6N/e2iFwBtEUa3DsJBdB+uXfVjBRAV6XbfsEqgPbLiatmpAC6Kt32C1YBtF9OXDUjBdBV6bZfsAqg/XLiqhlZAHRV5BqsLRRQAG2RBvdOQgF0b+5tEbkCaIs0uHcSCqB7c2+LyP8NAAD//0EV1XoAAAAGSURBVAMAMQ8BFhhmN4cAAAAASUVORK5CYII=</thumbnail><scenes select="1"><scene name="U3L1-Tic-Tac-Toe Setup"><notes></notes><hidden></hidden><headers></headers><code></code><blocks><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">LABEL will stamp text on the stage at the given font size. The direction of the text is the direction the sprite is facing, and color will match the pen color.</comment><header></header><code></code><translations></translations><inputs><input type="%txt">Hello!</input><input type="%n">12</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>text</l><l>size</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    context = stage.penTrails().getContext(&apos;2d&apos;),&#xD;    rotation = radians(this.direction() - 90),&#xD;    trans = new Point(&#xD;      this.center().x - stage.left(),&#xD;      this.center().y - stage.top()&#xD;    ),&#xD;    isWarped = this.Warped,&#xD;    len,&#xD;    pos;&#xD;&#xD;if (isWarped) {endWarp(); }&#xD;context.save();&#xD;context.font = size + &apos;px monospace&apos;;&#xD;context.textAlign = &apos;left&apos;;&#xD;context.textBaseline = &apos;alphabetic&apos;;&#xD;context.fillStyle = this.color.toString();&#xD;len = context.measureText(text).width;&#xD;trans = trans.multiplyBy(1 / stage.scale);&#xD;context.translate(trans.x, trans.y);&#xD;context.rotate(rotation);&#xD;context.fillText(text, 0, 0);&#xD;context.translate(-trans.x, -trans.y);&#xD;context.restore();&#xD;pos = new Point(&#xD;  len * Math.sin(radians(this.direction())),&#xD;  len * Math.cos(radians(this.direction())));&#xD;pos = pos.add(new Point(this.xPosition(), this.yPosition()));&#xD;this.gotoXY(pos.x, pos.y, false);&#xD;this.changed();&#xD;if (isWarped) {this.startWarp(); }&#xD;stage.changed();</l></block><list><block var="text"/><block var="size"/></list></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportListItem"><l>1</l><block var="data lists"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><custom-block s="empty? %l"><block s="reportCDR"><block var="lists"/></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportVariadicEquals"><list><block var="data"/><block s="reportNewList"><list></list></block></list></block></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><list></list></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data"/></block></block></script><list></list></block><block s="doReport"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="combine with %repRing items of %l"><block var="function"/><block s="reportCDR"><block var="data"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; then %&apos;true&apos; else %&apos;false&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%anyUE"></input><input type="%anyUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doReport"><block s="evaluate"><block var="true"/><list></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="false"/><list></list></block></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block var="start"/><block var="end"/></list></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportVariadicLessThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportVariadicGreaterThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="words"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></list></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></list></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-block></block></script><list></list></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block></script><scripts><script x="229.00000300000002" y="196.77778077777774"><block s="reportJoinWords"><list><l></l><l></l></list></block></script></scripts></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block><custom-block s="ignore %s"><l>3</l></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script><list></list></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="tell %&apos;sprite&apos; to %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%cs"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block var="action"/><block var="sprite"/></block><list></list></block></script></block-definition><block-definition s="ask %&apos;sprite&apos; for %&apos;expression&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportAttributeOf"><block var="expression"/><block var="sprite"/></block><list></list></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block></script></block-definition><block-definition s="make ONE row" type="command" category="motion"><comment x="0" y="0" w="155" collapsed="false">Custom procedure that uses the sprite to make one row of squares for the board. It changes the clone number by 1 and creates a clone of itself (to make a clone). Then it moves by 50 right to make the line. That is  repeated that procedure 3 times to make the 1st line of the Tic Tac Toe board.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRepeat"><l>3</l><script><block s="doChangeVar"><l>clone number</l><l>1</l></block><block s="createClone"><l><option>myself</option></l></block><block s="changeXPosition"><l>50</l></block></script></block></script></block-definition><block-definition s="make a tic tac toe board" type="command" category="motion"><comment x="0" y="0" w="90" collapsed="false">Custom procedure that makes the full 3x3 Tic Tac Toe board. For each column 1-3, the custom make one row procedure is done and the x and y coordiantes are changed to go vertical. Then the started sprite is sent far off.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="for %upvar = %n to %n %cs"><l>column</l><l>1</l><l>3</l><script><custom-block s="make ONE row"></custom-block><block s="changeXPosition"><l>-150</l></block><block s="changeYPosition"><l>-50</l></block></script></custom-block><block s="gotoXY"><l>1000</l><l>1000</l></block></script></block-definition><block-definition s="X&apos;s turn?" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l></l></block></script></block-definition><block-definition s="x wins?" type="predicate" category="operators"><comment x="0" y="0" w="90" collapsed="false">This is a custom procedure that determines if x wins. It uses a loop that checks if each triple from the list of winning triples checks the conditions where item 1, 2, and 3 of the triple in the board = x. If that condition is true, it reports true. When the loop is over, it reports false because the 3 slots are full.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="for each %upvar of %l %cs"><l>triple</l><block var="winning triples"/><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="triple"/></block><block var="board"/></block><l>X</l></list></block><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="triple"/></block><block var="board"/></block><l>X</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>3</l><block var="triple"/></block><block var="board"/></block><l>X</l></list></block></list></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></script></custom-block><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block-definition><block-definition s="o wins?" type="predicate" category="operators"><comment x="0" y="0" w="90" collapsed="false">This is a custom procedure that determines if o wins. It uses a loop that checks if each triple from the list of winning triples checks the conditions where item 1, 2, and 3 of the triple in the board = o. If that condition is true, it reports true. When the loop is over, it reports false because the 3 slots are full.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="for each %upvar of %l %cs"><l>triple</l><block var="winning triples"/><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="triple"/></block><block var="board"/></block><l>O</l></list></block><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="triple"/></block><block var="board"/></block><l>O</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>3</l><block var="triple"/></block><block var="board"/></block><l>O</l></list></block></list></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></script></custom-block><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block-definition><block-definition s="%&apos;variable&apos; wins?" type="predicate" category="operators"><comment x="0" y="0" w="90" collapsed="false">This is a custom procedure that determines if the variable the user inputs (x or o) wins. It uses a loop that checks if each triple from the list of winning triples checks the conditions where item 1, 2, and 3 of the triple in the board = the variable the user input. If that varaible is x, the sprite says x wins. Else, if that variable is 0, the sprite says that o wins. It reports true when the user clicks on the block. When the loop is over, it reports false because the 3 slots are full.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><custom-block s="for each %upvar of %l %cs"><l>triple</l><block var="winning triples"/><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>1</l><block var="triple"/></block><block var="board"/></block><block var="variable"/></list></block><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>2</l><block var="triple"/></block><block var="board"/></block><block var="variable"/></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>3</l><block var="triple"/></block><block var="board"/></block><block var="variable"/></list></block></list></block></list></block><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="variable"/><l>X</l></list></block><script><block s="bubble"><l>X wins</l></block></script><list><block s="reportVariadicEquals"><list><block var="variable"/><l>O</l></list></block><script><block s="bubble"><l>O wins</l></block></script></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></script></custom-block><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block-definition><block-definition s="draw?" type="predicate" category="operators"><comment x="0" y="0" w="160" collapsed="false">This is a custom procedure block that checks if the x and o turns both did not win, making a draw. The if loop checks if the board is completely full. If there are no Empty slots left, it means all 9 squares have been plaued. The not x wins and not o wins makes sure that neither have 3 in a row (from the winning tripples). If that is true, the block reports true when clicked on. If that is flase, the block reports false when clicked on.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIfElse"><block s="reportVariadicAnd"><list><block s="reportNot"><block s="reportListContainsItem"><block var="board"/><l>Empty</l></block></block><block s="reportVariadicAnd"><list><block s="reportNot"><custom-block s="%s wins?"><l>X</l></custom-block></block><block s="reportNot"><custom-block s="%s wins?"><l>o</l></custom-block></block></list></block></list></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="computer" type="command" category="motion"><comment x="0" y="0" w="157" collapsed="false">This script controls the computer’s move in the Tic Tac Toe game and runs when the computer block is triggered. 1st, the program checks whether three conditions are true, if it is not X’s turn (meaning it is O’s turn), the board still contains at least one empty space, and has not already won. If all these conditions are good, the computer goes. The program then uses a repeat until loop, where it randomly selects a position on the board from 1 to 9. It keeps selecting a new position until it finds one that is empty. When a empty position is found, the code places an O in that position by replacing the item space in the board list. This updates the board so win or draw work correctly. The program sets X’s turn to true, passing control back to the human.&#xD;-A.L</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block var="X&apos;s turn?"/><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block s="reportVariadicAnd"><list><block s="reportListContainsItem"><block var="board"/><l>empty</l></block><block s="reportVariadicEquals"><list><custom-block s="x wins?"></custom-block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></list></block></list></block><script><block s="doUntil"><block s="reportVariadicEquals"><list><block s="reportListItem"><block var="O&apos;s turn?"/><block var="board"/></block><l>empty</l></list></block><script><block s="doSetVar"><l>O&apos;s turn?</l><block s="reportRandom"><l>1</l><l>9</l></block></block></script></block><block s="doReplaceInList"><block var="O&apos;s turn?"/><block var="board"/><l>o</l></block></script><list></list></block><block s="doSetVar"><l>X&apos;s turn?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition></blocks><primitives></primitives><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" hyperops="true" codify="false" inheritance="false" sublistIDs="false" id="959"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAQAElEQVR4AezVC27kNhAEUCP3P3SC/NZeez6SSDWb9YJg1zsjkV2vDdQfH/4jQIAAAQIEbhdQwLeTu5AAAQIECHx8ZBew3wACBAgQIFAkoICL4F1LgAABAtkCCjh3/5ITIECAQKGAAi7EdzUBAgQI5Aoo4NzdZyeXngABAsUCCrh4Aa4nQIAAgUwBBZy5d6mzBaQnQGABAQW8wBKMQIAAAQJ5Ago4b+cSE8gWkJ7AIgIKeJFFGIMAAQIEsgQUcNa+pSVAIFtA+oUEFPBCyzAKAQIECOQIKOCcXUtKgACBbIHF0ivgxRZiHAIECBDIEFDAGXuWkgABAgQWE7i5gBdLbxwCBAgQIFAkoICL4F1LgAABAtkCCvjG/buKAAECBAj8J6CA/5Pw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WKhABAgQIdBBQwB22ZEYCBAgQ2E7gUAFvl14gAgQIECBQJKCAi+BdS4AAAQLZAgr47f17kAABAgQIjBNQwOMsnUSAAAECBN4WUMBvU2U/KD0BAgQIjBVQwGM9nUaAAAECBN4SUMBvMXkoW0B6AgQIjBdQwONNnUiAAAECBF4KKOCXRB4gkC0gPQECcwQU8BxXpxIgQIAAgacCCvgpjy8JEMgWkJ7APAEFPM/WyQQIECBA4KGAAn5I4wsCBAhkC0g/V0ABz/V1OgECBAgQ+FFAAf/I4kMCBAgQyBaYn14Bzzd2AwECBAgQ+CaggL+R+IAAAQIECMwXWLmA56d3AwECBAgQKBJQwEXwriVAgACBbAEFvOr+zUWAAAECWwso4K3XKxwBAgQIrCrwJwAAAP//lVwoVAAAAAZJREFUAwDU5ALRcl29HAAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="960"></list></costumes><sounds><list struct="atomic" id="961"></list></sounds><variables></variables><blocks></blocks><scripts><script x="20" y="20"><block s="reportVariadicEquals"><list><block s="reportListItem"><block s="reportListItem"><l>3</l><block var="triple"/></block><block var="board"/></block><l>X</l></list></block></script></scripts><sprites select="1"><sprite name="Square" idx="1" x="1000" y="1000" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="false" costume="1" color="80,80,80,1" pen="tip" id="977"><costumes><list id="978"><item><ref mediaID="U3L1-Tic-Tac-Toe Setup_Square_cst_Empty"></ref></item><item><ref mediaID="U3L1-Tic-Tac-Toe Setup_Square_cst_X"></ref></item><item><ref mediaID="U3L1-Tic-Tac-Toe Setup_Square_cst_O"></ref></item></list></costumes><sounds><list struct="atomic" id="979"></list></sounds><blocks></blocks><variables><variable name="clone number"><l>9</l></variable></variables><scripts><script x="20" y="11"><block s="receiveGo"><comment w="156.9999999999999" collapsed="false">When green flag clicked, the code runs. Clear block clears the previous board. Set X&apos;s turn to true indicated that it is X&apos;s turn first to make a move. Set clone number to 0 initializes the variable, helping manage the clones of the sprite. Set board to an empty list makes all 9 squares empty on the board. Set winnining tripples makes a list of squares that would make a win. Set winner to false initializes the winter varaible to track who won the game. go to (-50, 50) is where the sprite is first set to make a board. Switch costume to empty makes a blank costume so no board is drawn yet and the previous is gone. Then make a tic tac toe board makes an empty board.&#xD;-A.L</comment></block><block s="clear"></block><block s="doSetVar"><l>X&apos;s turn?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="doSetVar"><l>clone number</l><l>0</l></block><block s="doSetVar"><l>board</l><block s="reportNewList"><list><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l><l>Empty</l></list></block></block><block s="doSetVar"><l>winning triples</l><block s="reportNewList"><list><block s="reportNewList"><list><l>3</l><l>5</l><l>7</l></list></block><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l></list></block><block s="reportNewList"><list><l>1</l><l>5</l><l>9</l></list></block><block s="reportNewList"><list><l>2</l><l>5</l><l>8</l></list></block><block s="reportNewList"><list><l>4</l><l>5</l><l>6</l></list></block><block s="reportNewList"><list><l>7</l><l>8</l><l>9</l></list></block><block s="reportNewList"><list><l>1</l><l>4</l><l>7</l></list></block><block s="reportNewList"><list><l>3</l><l>6</l><l>9</l></list></block></list></block></block><block s="doSetVar"><l>winner</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="gotoXY"><l>-50</l><l>50</l></block><block s="doSwitchToCostume"><l>Empty</l></block><custom-block s="make a tic tac toe board"></custom-block></script><script x="28" y="320.5333333333333"><block s="receiveInteraction"><l><option>clicked</option></l><comment w="131" collapsed="false">This script runs when the board is clicked and controls how a move is made in the Tic Tac Toe game. 1st, the program checks three conditions before allowing a move, if the square is empty (costume #1), there is no winner yet (winner = false), and if it is currently X’s turn. If all conditions are true, the sprite switches its costume to X, marking the square. The program then sets X’s turn to false so the the computer can go. It also updates the board list by replacing the correct position with an X, which allows the computer to track the move. After the move is made, the program checks if the game ended in a draw. If the draw condition is true, the sprite says “DRAW”. The code also checks for a winner where if X wins, it says “X WON!” and sets winner to true. Else if O wins, it says “O WON!” and also sets winner to true. Setting winner to true prevents any moves from bein made after the game is over.&#xD;-A.L</comment></block><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="getCostumeIdx"></block><l>1</l></list></block><block s="reportVariadicEquals"><list><block var="winner"/><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></list></block><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="X&apos;s turn?"/><block s="reportBoolean"><l><bool>true</bool></l></block></list></block><script><block s="doSwitchToCostume"><l>X</l></block><block s="doSetVar"><l>X&apos;s turn?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doReplaceInList"><block var="clone number"/><block var="board"/><l>X</l></block><custom-block s="computer"></custom-block></script><list></list></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="draw?"></custom-block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block><script><block s="bubble"><l>DRAW</l></block></script><list></list></block><block s="doIf"><custom-block s="%s wins?"><l>X</l></custom-block><script><block s="bubble"><l>X WON!</l></block><block s="doSetVar"><l>winner</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list><custom-block s="%s wins?"><l>o</l></custom-block><script><block s="bubble"><l>O WON!</l></block><block s="doSetVar"><l>winner</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></list></block></script><script x="600" y="441.35"><block s="receiveOnClone"></block><block s="doWaitUntil"><block s="reportVariadicEquals"><list><block s="reportListItem"><block var="clone number"/><block var="board"/></block><l>o</l></list></block></block><block s="doSwitchToCostume"><l>O</l></block></script><script x="629" y="24.966666666666583"><custom-block s="o wins?"><comment w="242" collapsed="false">This is a custom procedure that determines if o wins. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><script x="633" y="96.96666666666658"><custom-block s="x wins?"><comment w="245" collapsed="false">This is a custom procedure that determines if x wins. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><script x="621" y="167.96666666666658"><custom-block s="%s wins?"><l></l><comment w="302" collapsed="false">This is a custom procedure that determines if the variable the user inputs (x or o) wins. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><script x="627" y="240.96666666666658"><custom-block s="draw?"><comment w="339" collapsed="false">This is a custom procedure block that checks if the x and o turns both did not win, making a draw. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><script x="613" y="314.1333333333331"><custom-block s="make ONE row"><comment w="332" collapsed="false">Custom procedure that uses the sprite to make one row of squares for the board. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><script x="603" y="389.96666666666647"><custom-block s="make a tic tac toe board"><comment w="262" collapsed="false">Custom procedure that makes the full 3x3 Tic Tac Toe board. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script><comment x="952.6013671875" y="469.3666666666667" w="176" collapsed="false">Because the original sprite was set off in the beginning, we use when I start as a clone because the board is just clones. The costume changes after it waits for the number on the board = 0.&#xD;-A.L</comment><script x="606" y="580"><custom-block s="computer"><comment w="361" collapsed="false">This script controls the computer’s move in the Tic Tac Toe game and runs when the computer block is triggered. Code and comments explaining are inside.&#xD;-A.L</comment></custom-block></script></scripts></sprite><watcher scope="Square" s="xPosition" style="normal" x="10.000000000000227" y="10.000000000000021" color="74,108,212" hidden="true"/><watcher scope="Square" s="yPosition" style="normal" x="10.000000000000227" y="31.000002000000023" color="74,108,212" hidden="true"/><watcher var="X&apos;s turn?" style="normal" x="10.000000000000227" y="52.00000400000009" color="243,118,29" hidden="true"/><watcher scope="Square" var="clone number" style="normal" x="10.000000000000227" y="73.0000059999999" color="243,118,29" hidden="true"/><watcher var="board" style="normal" x="9.000000000000455" y="14.000005999999985" color="243,118,29" extX="80" extY="70"/><watcher var="winning triples" style="normal" x="121.00000000000068" y="12.00000799999998" color="243,118,29" hidden="true"/><watcher var="winner" style="normal" x="10.000000000000227" y="94.00000799999994" color="243,118,29" hidden="true"/><watcher var="computer" style="normal" x="10.000000000000227" y="118.00000999999997" color="243,118,29" hidden="true"/><watcher var="O&apos;s turn?" style="normal" x="10.000000000000227" y="139.00001200000005" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="X&apos;s turn?"><bool>true</bool></variable><variable name="board"><list struct="atomic" id="1206">Empty,Empty,Empty,Empty,Empty,Empty,Empty,Empty,Empty</list></variable><variable name="winning triples"><list id="1207"><item><list struct="atomic" id="1208">3,5,7</list></item><item><list struct="atomic" id="1209">1,2,3</list></item><item><list struct="atomic" id="1210">1,5,9</list></item><item><list struct="atomic" id="1211">2,5,8</list></item><item><list struct="atomic" id="1212">4,5,6</list></item><item><list struct="atomic" id="1213">7,8,9</list></item><item><list struct="atomic" id="1214">1,4,7</list></item><item><list struct="atomic" id="1215">3,6,9</list></item></list></variable><variable name="winner"><bool>false</bool></variable><variable name="computer"><l>0</l></variable><variable name="O&apos;s turn?"><l>6</l></variable></variables></scene></scenes></project><media name="U3L1-Tic-Tac-Toe Setup" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"><costume name="Empty" center-x="26" center-y="26" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAA30lEQVR4AeySwQ3CQBADN4jv9RBRBIIftYCoCkE7IEQhpAN+R0IF9mdNLo6yP6+cnckqGnumgw7jTbWF6fvNazoojqdz1FpnPffHM0op699Bo51mXh/07yptyIaSCfiXSwZO19kQjSx5wYaSgdN1NkQjS16woWTgdJ3UEP21wIIPAiBJIzYkxQ+U2xAASRqxISl+oNyGAEjSiA1J8QPlNgRAkkZsSIofKLchAJI0slxDUuxEuQ0RsCRRG5JgJ0ptiIAlidqQBDtRakMELEm0TUO36yW6rpv17HfbGIb35wsAAP//YCtmxAAAAAZJREFUAwBGS82CCTBFoQAAAABJRU5ErkJggg==" mediaID="U3L1-Tic-Tac-Toe Setup_Square_cst_Empty"/><costume name="X" center-x="26" center-y="26" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAACZ0lEQVR4AezZy0ojQRQG4MOsZjU+QGaGIczMMzgMQ2YfIwRdKF6yVLyAglvFVjeCuhLxEsEXEEHpd4i4iYqaVRBv+AjqSv+GBhFS3VV1TnW3uDghIV2n/i9Vi1T3JyL6USqV13t6eneyXuVy91QAur+/q/z9V8h0/fz1u/L09DgGEOXz+YexkSHKchWLxZfNRhSAgnfv5OUDlPaFVK7Q1fVN6vJHZVKCPG+OpmdmU4M6O7+g/4UC7e7tt8ykBK0sL1Gj0UgFCphSRwf19Q9QV7nTDNTW9oWqW5uJo15j5ufUO0a5QvgZkkbpYJA3EoSLkkLpYpA1FggXukaZYJAzNggXu0KZYpBRC4QB0igbDPJpgzBICmWLQTYjEAZyozgwyGUMwmAuFBcGmaxAaGCL4sQgjzUITUxR3BhkYQGhkS5KAoMcbCA0i4uSwiADKwgNo1CSGMzPDkLTVihpDOYWAaHxW5QLDOYVA6F5iKrX6/SnvT04nEWdZzDOpkRBCHZze0unJ8eUy+XwUbxEQeE2GxisUK1Wc3LyFQOFGNwDwDYLt5/0PQoR0FtMuM9coNhBrTCuUKygKIwLFBsoLkYaxQLSxUiirEGmGCmUFcgWI4EyBnFhuFFGIG4MJ0obJIXhQsUGYUJpDOZA2fyjiA1yhQEIZYqKBXKNAQhlgooEJYUBCKWLUoKSxgCE0kEpQZMTk06OzQgdVa9Rxg+Nq9tVwuEsajJX34co44fG3799dZU19jxAqS5WbjnVwLR+9wFK68qEuYIVajabn1fXNijL5ft+YALo8ujocHF8dNjLci3Me57vH8w+AwAA//+k3GjbAAAABklEQVQDAJg3Rha9RQziAAAAAElFTkSuQmCC" mediaID="U3L1-Tic-Tac-Toe Setup_Square_cst_X"/><costume name="O" center-x="26" center-y="26" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAFPElEQVR4AeyaX1BUVRjAv216iwVfGapxCJDqJVCSHgqGAWoa1P5oLpJNkyyS1aQsMT1k7Goz/XPBpiJls2kyYBVLRXooCwMfwv64vVSahjNYkY8Czf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