<snapdata remixID="10000741"><project name="U3L3 TicTacToe Starter" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAJlElEQVR4nO3c3W9T5x3A8fMHTKuYtkuq3e5q0zQJJlWsDOimQVdP7dS9aNvFkCZUoVm0Y70AVQHSQlYIJDG0pTiEobiA40ASEhy/xS8nfo+dxNix4xcCCYImTAI0d6JI311UPMMFRDUxP5P8+0g/AYk5D3r01fE5NrGBEBoZuv8BorU1BHj79m2WlpaaPjdu3OD+/fu69kBopAKMRCLk83kWFhaaPrVaDY/Hw71793TuhdDAALh58ya1Wo1arUZXV5f6/ZPG4XA89TH/zXg8HjkTthgDIBAIUK1WqVarWK1WOjs72b9/Pz09PcTjcbZs2YLVamV8fJyBgQH6+vrU45/llMtllpaWdO+JaCIDYHR0lEqlQqVSwWq1smbNGrxeL+vWrePNN9/khRdewGq1Uq1W2bx5M319ferxz3oWFhZ074loIgPg4sWLzM/P/1/MlStXdO+JaCIDYGRkhFKpRKlUYmVlhU/e/iXOHT/9n88560vcuXNbrV0qlSTAFmMADA8PUywWKRaLTEfc/OOt1fj3/prLqUmuXLnyzKc4nWS4Yzt3d66mfvQXau1isSgBthgDYGhoiEKhQKFQwBzspbjrhw13p3duLXPkB1/Du+HrX5rnHpnbCQ+FQoHp6Wmmp6cbjlMul0kmk8RiMbxeLxf2baVus6i1C4UCtVpN85aIZjIALly4QD6fJ5/PYw720t+zn0qlwrvvvkulUiEyeJriy6vULPe1Uf3jd6lu/V7D14svr2LhLz8hl8tRLpcpl8sNNxiZTIZMJsPU1BSbNm3CHBugbrOotfP5vATYYgyA8+fPk8vlyOVymIO9HD9+nFwuxxtvvMH8/DwTjo8fCe3+7ZVHvvYgwNnZWRXgwzcYqVSKfD5PIpFg06ZNxGIx6jaLWjuXy0mALcYAGBwcZHZ2ltnZWczBXj788EOKxSLbtm2jWCwy4TjeENmdoJPat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BCi0kgCFVhKg0EoCFFpJgEIrCVBoJQEKrSRAoZUEKLSSAIVWEqDQSgIUWkmAQisJUGglAQqtJEChlQQotJIAhVYSoNBKAhRaSYBCKwlQaCUBCq0kQKHVvwHaEtw+oiOagwAAAABJRU5ErkJggg==</thumbnail><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" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAACtUlEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Bo3+AAF/RMkcAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Square" idx="1" x="50" y="-50" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="false" hidden="true" costume="1" color="80,80,80,1" pen="tip" id="8"><costumes><list id="9"><item><costume name="Empty" center-x="29" center-y="28" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAAAyElEQVRoge3auw3DMBAE0S3NwSXXhUu5TlyCSlAJzJmwBJYgJ3LiT2QDgsY7wOZ8IENKUklaJA3oFu3IVdIG3fqMHJk5qmo78zLzcYuvyMwcvfexnbze+9ihr8iqOvp8P6uq3j9XI0+WkZSMpGQkJSMpGUnJSEpGUjKSkpGUjKRkJCUjKRlJyUhKRlIykpKRlIykZCQlIykZSclISv+NjIjZWptHH/DbWmszIuZbpKQZEfPo79Xfbgd+RBK3StJ1h96gK0m60HcH5Sd6iyhylfcAAAAASUVORK5CYII=" id="10"/></item><item><costume name="X" center-x="29" center-y="29" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA6CAYAAAAKjPErAAACx0lEQVRogd3bO66bQBQG4LMAJCjd+fa2BTtwlsAOoEjhJdBBmc4VNUtwdkDhMgVLQKlTTHErS5H+FNcT4bnDa15c+KUj2cZI5xusQR6PibaZQHyhIKIbEbUbqd9E9CCi9+fjG0fWRISNVi0iH57nPbIsQ1EUq6osy7Db7SYhQUSIogiMMawpcRy/4A6Hw59B5NqgaZq+9F5VFYqikF9JcTTWABWBeZ4DQD+yKApUVbUaqAhMkuT/sUEkgFVAh4DABCQghzZN45gizxgQmIgEPkODIFgcOgUIzEACQF3X8H3/S0DFQe8DAjORANA0zeLQOUBAAQksCxWB5/N59BwlJLAMVASGYThppldGAm6hqkBAEwm4geoAAQNIwC5UFwgYQgJ2oE3TIAgCLSBgEMmbMgU1BQQMI3lzulAR6Ps+2rZV6gewgORNqkJlQN2PvRUkb1aE3m630XNMAwGLSN50F0rPb+p977UBBCwjAaBtW4RhOAht29YaEHCABADGWC+UMYYoiqwBAUdIQA4ty9I6EHCIBOTQbo1NTKpxigQ+oMfj8ROwb0IykUWQp9Npu0hxknEFdYoUgWVZjt5eTMQZUrZ8DwzfXkzFCbIPyGMbah05dW3UJtQqciqQRwY10Yc15FwgjwyapqlWL1aQqkAexhiSJDEGNY7M81wL2I0pqFHk3OX7KTEBNYa0AeTRhRpBmlgbHYsOVBvpAsijCtVCugTyqECVkUsAeeZClZB1XS8G5JkDVfql2dTyvW6mQmchReB+v198u8sU6GSkzcVf3YjQOI5fBn8S8isDeURod1PVKHINQJ7r9SqFDiLXBOSR7R7LskyOzLIMb29vqwLyiNDOBt9XpOd5f9cI5BGhz7pz5F08eLlcFt9yrVLinl0iYhz5LhmBrdQvIqKUiH7Sx98M+OWtNlD3ZxVERN+e9Z2IfnSeb6b+AQI4tq8sOMZbAAAAAElFTkSuQmCC" id="11"/></item><item><costume name="O" center-x="28" center-y="28" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAADhUlEQVRoge2a3bGrIBSF6UA60A5MB6QD04F2oB1AB6YD7YAStANLoARKWPchNw6oUVSMmeSsGfMQf9gfbBYCEkKIIIQ0X3wI8v8HX3z8JqTAF2jIZEF+k06BVEqhbVu0bQul1KFlAW+AbNsWRVHgcrks9pnL5YKiKNC2rbfygYMglVLIsgyU0s0mQSlFlmVeWtorpNYaQohFgDAMwRgDYwxhGC5eL4SA1vp8yKqqJlsuDEPkeQ4p5eIzpJTI83wSnFKKqqo2IHqCLIpiFBRjDE3TbAoKAJqmAWNs9NyiKFY/axek1hq3223Uci6t5iop5ahlb7fbqvTdDKm1Hjlmmqa7+s5cWWmajpzYtazNkFmWWYVyzneiLItzbpWZZZnTfZsgh4VtNYQtqqpqdeWuhpRSWoXkee4RwU15nlsxLHnAasgoivqbkiTxHb+zkiTp44iiaPbaVZBlWfY3BEFwiMm4SmuNIAj6eMqyfHmtM6TW2hrs5x76LpmVTil9WenOkOYDwzA8OHx3mWPoq4p3hjTHxHe66ZJMt2WMTV7jBKm1ttzszL44lEtsTpAutXWm4jiezTInSPOV6hMMZyjTL9I0HZ13gjRnA3tmFkepaZrZTPuDfMocHz/JdJ4yzYdSOjrvBGm616dqLsY/yKdMi+667l1xO6vruj6+OI5H53/NeLgTpM/1G18y57ib3dVcCZgabM+W+bIytVLg1JJmzi9NUM+QOcRNeYZTSwKwJqifZD5mA7yaAjpDminxSSnrEpczpOlghJC3bLktSSllxfTK+Z0hAdtlr9frgeG76Xq9zrrqU6sghzV35nAyXH+dy6xVkIDdByilp5hQ13WWoy55xGpIrbX1mhdF0VtnJsNVwziOF8tfDQk8atIcUtZsvuyRUspaUAuCwCmTNkECY7c9OnWHKTrnpkNthgTGnZ9Sivv9vgNlWvf73SqHkHXLorsggXHqPtPXx2ylaZrRHqhripraDQk8+oppRuZYWtf1qhcHpRTqurbGQNNktryEeIEEHq7HOR+1qtm6QggIIVDXdf+xUl3X/f+vvvUJggCc883m5g3ShB1ufe85fGzRe4d8SimFsiytfUTXI0kSlGXp7f34MEhTWmtIKcE5B+ccaZr2Hyuladr/L6U8ZLx9C+TZMiD5L0D+REvakISQ5uzgfIg8PrB/CfmNx09AckIIuX778Q//cwRX84YLFwAAAABJRU5ErkJggg==" id="12"/></item></list></costumes><sounds><list struct="atomic" id="13"></list></sounds><blocks></blocks><variables><variable name="position number"><l>10</l></variable></variables><scripts><script x="369.67350260416663" y="49.66666666666666"><block s="receiveGo"><comment w="53.333333333333336" collapsed="true">3.1.5.5</comment></block><custom-block s="makeBoard"><comment w="129.33333333333334" collapsed="true">3.1.5.6  Look inside. </comment></custom-block><block s="doSetVar"><l>X&apos;s turn?</l><block s="reportBoolean"><l><bool>true</bool></l><comment w="90" collapsed="true">X plays first.</comment></block></block><block s="doSetVar"><l>board</l><block s="reportNewList"><list><l>1</l><l>2</l><l>3</l><l>4</l><l>5</l><l>6</l><l>7</l><l>8</l><l>9</l></list></block></block></script><script x="22.67350260416663" y="23.00000000000003"><block s="receiveInteraction"><l><option>clicked</option></l><comment w="53.333333333333336" collapsed="true">3.1.5.7</comment></block><block s="doIf"><block s="reportEquals"><block s="getCostumeIdx"></block><l>1</l><comment w="124" collapsed="true">If square is empty...</comment></block><script><block s="doIfElse"><block var="X&apos;s turn?"/><script><block s="doSwitchToCostume"><l>X</l></block><block s="doReplaceInList"><block var="position number"/><block var="board"/><l>X</l></block></script><script><block s="doSwitchToCostume"><l>O</l></block><block s="doReplaceInList"><block var="position number"/><block var="board"/><l>O</l></block></script></block><block s="doSetVar"><l>X&apos;s turn?</l><block s="reportNot"><block var="X&apos;s turn?"/></block><comment w="171.33333333333334" collapsed="false">Alternate between TRUE (x&apos;s turn) and FALSE (o&apos;s turn)</comment></block><block s="doIf"><custom-block s="won? %s"><l>X</l></custom-block><script><block s="bubble"><l>X has won the game!</l></block></script></block><block s="doIf"><custom-block s="won? %s"><l>O</l></custom-block><script><block s="bubble"><l>O has won the game!</l></block></script></block><block s="doIf"><custom-block s="empty? %l"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l><option>number</option></l></block></autolambda><list></list></block><block var="board"/></block></custom-block><script><block s="bubble"><l>The game has tied!</l></block></script></block></script></block></script></scripts></sprite><watcher var="X&apos;s turn?" style="normal" x="7.5416666666667425" y="7.541666666666657" color="243,118,29" hidden="true"/><watcher scope="Square" var="position number" style="normal" x="5.279166666666583" y="233.79166968333334" color="243,118,29" hidden="true"/><watcher var="board" style="normal" x="3.7708333333332575" y="8.295834841666661" color="243,118,29" extX="80" extY="70"/></sprites></stage><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></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></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="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></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></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></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="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></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="reportGreaterThan"><block var="i"/><block var="end"/></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></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></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></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></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="makeBoard" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doSwitchToCostume"><l>Empty</l></block><block s="show"></block><block s="doSetVar"><l>position number</l><l>1</l></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>1</l><l>3</l><script><custom-block s="for %upvar = %n to %n %cs"><l>j</l><l>1</l><l>3</l><script><block s="gotoXY"><block s="reportSum"><l>-100</l><block s="reportProduct"><l>50</l><block var="j"/></block></block><block s="reportDifference"><l>100</l><block s="reportProduct"><l>50</l><block var="i"/></block></block></block><block s="createClone"><l><option>myself</option></l></block><block s="doChangeVar"><l>position number</l><l>1</l></block></script></custom-block></script></custom-block><block s="hide"></block></script></block-definition><block-definition s="possible winning triples" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><block s="reportNewList"><list><l>1</l><l>2</l><l>3</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>2</l><l>5</l><l>8</l></list></block><block s="reportNewList"><list><l>3</l><l>6</l><l>9</l></list></block><block s="reportNewList"><list><l>1</l><l>5</l><l>9</l></list></block><block s="reportNewList"><list><l>3</l><l>5</l><l>7</l></list></block></list></block></block></script></block-definition><block-definition s="status of triple %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportOr"><block s="reportEquals"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l></l><block var="board"/></block></autolambda><list></list></block><block var="list"/></block><block s="reportNewList"><list><l>X</l><l>X</l><l>X</l></list></block></block><block s="reportEquals"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l></l><block var="board"/></block></autolambda><list></list></block><block var="list"/></block><block s="reportNewList"><list><l>O</l><l>O</l><l>O</l></list></block></block></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="status of all winning triples" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l></l><block var="board"/></block></autolambda><list></list></block><custom-block s="possible winning triples"></custom-block></block></block></script></block-definition><block-definition s="won? %&apos;letter&apos;" type="predicate" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportListContainsItem"><custom-block s="status of all winning triples"></custom-block><block s="reportNewList"><list><block var="letter"/><block var="letter"/><block var="letter"/></list></block></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></blocks><variables><variable name="X&apos;s turn?"><bool>false</bool></variable><variable name="board"><list struct="atomic" id="892">X,O,X,X,O,X,O,X,O</list></variable></variables></project><media name="U3L3 TicTacToe Starter" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>