<snapdata remixID="11373460"><project name="2.6 Pong" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAENElEQVR4nO3YS2hjZRiH8e+cXNumaWMXgiYMdOPg0sXILCSICCKWbly463qg605x24UguNaiLQVhgpaCUApeyghVbBZKNq1MWwJO56YUrLWO0JxD/m6mwZCxt2TmjTnP4kfgkC/58vJwLnE6qqleO5tisahisai5uTmFYSjnHCAd1S7M6aimMAwvxPqHozsQIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEwRIEx1PMCtrS0tLy+famJi4kLGx8fNh4YuDXBhYUE7Ozvnsre3p5k38vrkrZFTHRwcNNblcjnz4aGLAtzc3NTGxsa5/fbrAx1OFc7k4b3txrqVlRXz4aGLAiyVSqpUKg2lUklBEMg5p0ql0njN5/PK5/Oan59XpVLRg/v3dDhVkFSXJB1OFRTe/qnl2OFUQX/d3Wr6jkQiYT5AdEmAi4uLKpfLTarVqoIg0NLSkra3tzUzM6NqtarR0VFJUrlc1t07uzqcKqj+8HdJ9aYzXsuxO7eaPj8ej5sPEF0S4P7+vtbW1s5t9/YvZ74E/7l7q7FucnLSfHjoogDDMNTs7KxWV1fPLQhqUr1+quP3T09Pmw8OXRgg/wPivAgQptoKsFYjQLSHAGGqrQCDICBAtKWtAC8aHwHiGAHCFJdgmOIhBKYIEKYIEKYIEKYIEKYIEKYIEKYIEKYIEKYIEKYIECbSo6PKjY3p+yBs0fEAv/5yXy+/9HOThPtUzqXMBwEbz1+/rqvSY9U7HeD7791X0v3YwnPPmQ8CBIgIIkAQIAFGFwGCAAkwuggQBEiA0UWAIEACjC4CNJTwfWV8X4PxmOKeZ74fAoyIdDKpa8VX9HlhRF8MxXVjJKV3c/26FItehAT4lKVivj64fEnrQ75+GHQN64NOX2Wcrvj2eyTAHuU5pzcH+7SW9Zri+7ebA05Dnv1eCbAH9cV8ffhMWuv/Ed+xKzH7vRJgDxqKeboxnDwxwPVBp3fSvvleCbAH9TunzwbciQGuZZ3GBlLyumC/BNhjfOc0kzr58rsynNAL6bT5XgmwR132nZYfnQVbzoRZT9dyA/J5CCHAJ+lF3+njrKebWU/fPQrx26yniZSnpB+d+z8CNJTxPF3tT+rt4Yxey/bp2WQ8Mvd9BIiuQYAgQAKMLgIEARJgdBEgCJAAo6sjAeqIAEGA+B8iQBAgAUbXUw1w9Zs/9PqrW00S7iM5N2A+CEQgwMexHgBseYmEYpmM/j6qtThLfASIjjhrbASIJ4IAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYYoAYaqdAP8BdcfhZqsNiS8AAAAASUVORK5CYII=</thumbnail><scenes select="1"><scene name="2.6 Pong"><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="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.000003" 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="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="%&apos;x&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="numbers from %&apos;from&apos; to %&apos;to&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n">1</input><input type="%n">10</input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="from"/><block var="to"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block var="from"/><custom-block s="numbers from %n to %n"><block s="reportVariadicSum"><list><block var="from"/><l>1</l></list></block><block var="to"/></custom-block></block></block></script></block-definition><block-definition s="map %&apos;func&apos; over %&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="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="func"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><custom-block s="map %repRing over %l"><block var="func"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block-definition></blocks><stage name="Stage" width="480" height="360" costume="1" 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="480"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAACtUlEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+Bo3+AAF/RMkcAAAAAElFTkSuQmCC</pentrails><costumes><list id="481"><item><ref mediaID="Stage_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="482"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Left paddle" idx="2" x="-200" y="0" heading="90" scale="0.4" volume="100" pan="0" rotation="1" draggable="true" costume="1" color="80,80,80,1" pen="tip" id="487"><costumes><list id="488"><item><ref mediaID="Left paddle_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="489"></list></sounds><blocks></blocks><variables></variables><scripts><script x="12.882882882882882" y="23.73873873873889"><block s="receiveMessage"><l>Reset</l><list></list></block><block s="gotoXY"><l>-200</l><l>0</l></block></script><script x="16.486486486486484" y="118.01801801801804"><block s="receiveGo"><comment w="90" collapsed="false">W and S key moves the left paddle</comment></block><block s="doForever"><script><block s="doIf"><block s="reportKeyPressed"><l><option>w</option></l></block><script><block s="changeYPosition"><l>10</l></block></script></block><block s="doIf"><block s="reportKeyPressed"><l><option>s</option></l></block><script><block s="changeYPosition"><l>-10</l></block></script></block></script></block></script><script x="297" y="25"><block s="receiveMessage"><l>Start</l><list></list></block><block s="gotoXY"><l>-200</l><l>0</l></block></script></scripts></sprite><sprite name="Right paddle" idx="3" x="200" y="0" heading="90" scale="0.4" volume="100" pan="0" rotation="1" draggable="true" costume="1" color="80,80,80,1" pen="tip" id="527"><costumes><list id="528"><item><ref mediaID="Right paddle_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="529"></list></sounds><blocks></blocks><variables></variables><scripts><script x="30" y="122.00900900900899"><block s="receiveMessage"><l>Reset</l><list></list></block><block s="gotoXY"><l>200</l><l>0</l></block></script><script x="30" y="195.009009009009"><block s="receiveGo"><comment w="90" collapsed="false">Arrow keys move the right paddle</comment></block><block s="doForever"><script><block s="doIf"><block s="reportKeyPressed"><l><option>up arrow</option></l></block><script><block s="changeYPosition"><l>10</l></block></script></block><block s="doIf"><block s="reportKeyPressed"><l><option>down arrow</option></l></block><script><block s="changeYPosition"><l>-10</l></block></script></block></script></block></script><script x="326" y="106"><block s="receiveMessage"><l>Start</l><list></list></block><block s="gotoXY"><l>200</l><l>0</l></block></script></scripts></sprite><sprite name="Ball" idx="1" x="0" y="0" heading="239" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="1" color="255,250,251,1" pen="tip" id="567"><costumes><list id="568"><item><ref mediaID="Ball_cst_Untitled"></ref></item></list></costumes><sounds><list id="569"><item><ref mediaID="Ball_snd_Pop"></ref></item><item><ref mediaID="Ball_snd_Chord"></ref></item></list></sounds><blocks></blocks><variables><variable name="Speed"><l>0</l></variable></variables><scripts><script x="713.7927927927917" y="391.864864864865"><block s="doBroadcastAndWait"><l>End</l><list></list></block><block s="doStopThis"><l><option>this block</option></l></block></script><script x="563.3243243243232" y="563.7087087087089"><block s="receiveMessage"><l>End</l><list></list></block><block s="doIf"><block s="reportEquals"><block var="Player 1 Score"/><l>5</l></block><script><block s="doSayFor"><l>Player 1 Wins!</l><l>3</l></block></script><comment w="90" collapsed="false">Winning player is shown when game ends.</comment></block><block s="doIf"><block s="reportEquals"><block var="Player 2 Score"/><l>5</l></block><script><block s="doSayFor"><l>Player 2 Wins!</l><l>3</l></block></script></block><block s="doAsk"><l>Enter "restart" to play again</l><comment w="90" collapsed="false">Players are asked if they want to begin a new game and correctly replays game</comment></block><block s="doIfElse"><block s="reportEquals"><block s="getLastAnswer"></block><l>restart</l></block><script><block s="doBroadcastAndWait"><l><option>__shout__go__</option></l><list></list></block></script><script><block s="doStopThis"><l><option>all</option></l></block></script></block></script><comment x="906.3243243243234" y="435.70870870870885" w="181.8918918918919" collapsed="false">Use these broadcasts(Reset and End) within the script for block &quot;when I receive Start&quot; </comment><comment x="818.6936936936928" y="28.009009009009105" w="234.14414414414415" collapsed="false">*Identify your variables.  What values do you need to keep track of and modify?  Make and set your variables. &#xD;*Add your loop with conditionals.  You are going to repeat until what happens?&#xD;*Create your if statements.  If something happens then do what?</comment><script x="553.6936936936926" y="204.8423423423426"><block s="turn"><block s="reportRandom"><l>270</l><l>300</l></block></block></script><script x="825.6846846846835" y="262.99099099099135"><block s="gotoXY"><l>0</l><l>0</l></block></script><script x="685.6936936936927" y="324.00900900900933"><block s="turn"><block s="reportRandom"><l>179</l><l>90</l></block></block></script><script x="559.6936936936927" y="287.3423423423426"><block s="reportOr"><l/><l/></block></script><script x="669.6936936936928" y="478.8423423423428"><block s="reportRandom"><l>120</l><l>90</l></block></script><script x="10" y="10"><block s="receiveGo"><comment w="90" collapsed="false">Game Starts with Green Flag</comment></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="doBroadcast"><l>Start</l><list></list></block><block s="doSetVar"><l>Player 1 Score</l><l>0</l></block><block s="doSetVar"><l>Player 2 Score</l><l>0</l></block><block s="doHideVar"><l>Speed</l></block><block s="doHideVar"><l>Player 1 Score</l></block><block s="doHideVar"><l>Player 2 Score</l></block></script><script x="890.6846846846848" y="180.99099099099112"><block s="gotoXY"><l>0</l><l>0</l></block></script><script x="313.68468468468484" y="35.99099099099112"><block s="receiveMessage"><l>Reset</l><list></list><comment w="90" collapsed="false">When a player scores, the second round starts</comment></block><block s="doWait"><l>.5</l></block><block s="doBroadcast"><l>Start</l><list></list></block></script><script x="26.693693693692808" y="230.0090090090091"><block s="receiveMessage"><l>Start</l><list></list></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="doSetVar"><l>Score</l><block s="reportJoinWords"><list><block var="Player 1 Score"/><l> : </l><block var="Player 2 Score"/></list></block></block><block s="doSetVar"><l>Speed</l><l>5</l></block><block s="doSayFor"><l>3..</l><l>1</l></block><block s="doSayFor"><l>2..</l><l>1</l></block><block s="doSayFor"><l>1..</l><l>1</l></block><block s="setHeading"><block s="reportRandom"><l>80</l><l>110</l></block><comment w="90" collapsed="false">The ball goes between 80 and 110 degrees</comment></block><block s="doForever"><script><block s="bounceOffEdge"></block><block s="doIf"><block s="reportTouchingColor"><color>57,255,255,1</color></block><script><block s="playSound"><l>Pop</l><comment w="90" collapsed="false">When it hits off of a paddle, a short sound will play.</comment></block><block s="doIf"><block s="reportEquals"><block s="direction"></block><l>90</l></block><script><block s="turn"><block s="reportRandom"><l>175</l><l>185</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>46</l></block><block s="reportLessThan"><l>0</l><block s="direction"></block></block></block><script><block s="turnLeft"><block s="reportRandom"><l>115</l><l>75</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>90</l></block><block s="reportLessThan"><l>45</l><block s="direction"></block></block></block><script><block s="turnLeft"><block s="reportRandom"><l>135</l><l>115</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>180</l></block><block s="reportLessThan"><l>134</l><block s="direction"></block></block></block><script><block s="turn"><block s="reportRandom"><l>115</l><l>75</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>135</l></block><block s="reportLessThan"><l>90</l><block s="direction"></block></block></block><script><block s="turn"><block s="reportRandom"><l>135</l><l>115</l></block></block></script></block><block s="doChangeVar"><l>Speed</l><l>.5</l><comment w="90" collapsed="false">Ball increases in speed each time it bounces off a paddle.</comment></block></script></block><block s="doIf"><block s="reportTouchingColor"><color>6,0,204,1</color></block><script><block s="playSound"><l>Pop</l><comment w="90" collapsed="false">When it hits off of a paddle, a short sound will play.</comment></block><block s="doIf"><block s="reportEquals"><block s="direction"></block><l>270</l></block><script><block s="turnLeft"><block s="reportRandom"><l>175</l><l>185</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><l>270</l><block s="direction"></block></block><block s="reportLessThan"><block s="direction"></block><l>316</l></block></block><script><block s="turn"><block s="reportRandom"><l>135</l><l>115</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><l>315</l><block s="direction"></block></block><block s="reportLessThan"><block s="direction"></block><l>360</l></block></block><script><block s="turn"><block s="reportRandom"><l>115</l><l>75</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>270</l></block><block s="reportLessThan"><l>224</l><block s="direction"></block></block></block><script><block s="turnLeft"><block s="reportRandom"><l>115</l><l>75</l></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportLessThan"><block s="direction"></block><l>225</l></block><block s="reportLessThan"><l>180</l><block s="direction"></block></block></block><script><block s="turnLeft"><block s="reportRandom"><l>135</l><l>115</l></block></block><block s="doChangeVar"><l>Speed</l><l>.5</l><comment w="90" collapsed="false">Ball increases in speed each time it bounces off a paddle.</comment></block></script></block></script></block><block s="forward"><block var="Speed"/></block><block s="doIf"><block s="reportTouchingColor"><color>252,252,252,1</color></block><script><block s="gotoXY"><l>0</l><l>0</l></block><block s="doChangeVar"><l>Player 2 Score</l><l>1</l></block><block s="doSetVar"><l>Speed</l><l>0</l></block><block s="playSound"><l>Chord</l><comment w="90" collapsed="false">A point is scored and a short sound is played</comment></block><block s="doSayFor"><l>Player 2 scored!</l><l>2</l></block><block s="doBroadcast"><l>Reset</l><list></list></block></script></block><block s="doIf"><block s="reportTouchingColor"><color>255,249,250,1</color></block><script><block s="gotoXY"><l>0</l><l>0</l></block><block s="doChangeVar"><l>Player 1 Score</l><l>1</l></block><block s="doSetVar"><l>Speed</l><l>0</l></block><block s="playSound"><l>Chord</l><comment w="90" collapsed="false">A point is scored and a short sound is played</comment></block><block s="doSayFor"><l>Player 1 scored!</l><l>2</l></block><block s="doBroadcast"><l>Reset</l><list></list></block></script></block><block s="doIf"><block s="reportOr"><block s="reportEquals"><l>5</l><block var="Player 1 Score"/></block><block s="reportEquals"><l>5</l><block var="Player 2 Score"/></block></block><script><block s="doBroadcast"><l>End</l><list></list></block><block s="doStopThis"><l><option>this block</option></l></block></script><comment w="90" collapsed="false">Game ends when one player reaches five points.</comment></block></script></block></script></scripts></sprite><watcher scope="Ball" var="Speed" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="Player 1 Score" style="normal" x="10" y="31.000001999999995" color="243,118,29" hidden="true"/><watcher var="Score" style="normal" x="10" y="52.00000399999999" color="243,118,29"/><watcher var="Player 2 Score" style="normal" x="10" y="73.00000599999998" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="Player 1 Score"><l>0</l></variable><variable name="Score"><l>0 : 0</l></variable><variable name="Player 2 Score"><l>1</l></variable></variables></scene></scenes></project><media name="2.6 Pong" app="Snap! 7, https://snap.berkeley.edu" version="2"><costume name="Untitled" center-x="240" center-y="180" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAIiklEQVR4nO3dQWokZRiA4TpCbuBRcoScKMELDHiANOM9hoAwCsoQcJvMIm4jijgbma7OlKseZRamW1vf/u1n8Sx++Ipe/IuXj4Lqab1eL1uXl5fLNE3PWt6vd/LcM7v81tnZ2XJ7e7tsNptls9ksV1dXOz0HwGn44f5+5y4dk+np6enD9vBh/d87Pz//S6vV6mN8N5vNcnFxkV82AMdj2ABP0zRtD38O3bGqLxqA4yLAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEDgkAF+99PPO89+9/U3AgzA6bIBCzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGIHDIAP/267udZx/u3gowAKfLBizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQh8+/r1waL4/Zs3O8++vF4JMACn66tXr/JtVoABODkCLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGIDBsgNfrPw51XAUYgH0NHeCtOq4CDMC+BFiAAQgMH+B5nvO4CjAA+xo+wHVYBRiAv0OABRiAgAALMACBoQM8yvtfAQbgUwIswAAEBFiAAQgMG+CR4ivAAHxKgAUYgIAACzAAgWEDXAdVgAH4JwRYgAEICLAAAxAYPsCjvAuuLxqA4zJ8gEf5HGV90QAcl2EDPM/zMs+zAAMwpGEDvP0zBgEGYEQCLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAwPABXt4LMADjEWABBiAwdIC3hzquAgzAvgRYgAEIDBvgZVk+E2AARjVsgKdpmgQYgFEJsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAocM8C+PP+48+3D3VoABOF02YAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQOCLFy8OFsUvr693nn15vRJgAE7X55eX+TYrwACcHAEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAAEBFmAAAgIswAAEBFiAAQgIsAADEBBgAQYgIMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQEGABBiAgwAIMQECABRiAgAALMAABARZgAAICLMAABARYgAEICLAAAxAQYAEGICDAAgxAQIAFGICAAAswAIFDBvjh7v5fmRVgAP53bMACDEBAgAUYgIAACzAAAQEWYAACAizAAAQEWIABCAiwAAMQGDnAHw+beX7W4+Pjwdzc3OytvmgAjsuoAf4dJfL2oZldQdoAAAAASUVORK5CYII=" mediaID="Stage_cst_Untitled"/><costume name="Untitled" center-x="21" center-y="126" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAD8CAYAAAABpDZpAAAA+0lEQVR4nO3OoQ2AUBTAwKfYfzB2AoPAgSD5Jbkm9Tdztc1+FJ97qzGvsKsRr7GrAaCgoKCgoKCgoKB/GBS0PihofVDQ+qCg9UFB64OC1gcFrQ8KWh8UtD4oaH1Q0PqgoPVBQeuDgtYHBa0PClofFLQ+KGh9UND6oKD1QUHrg4LWBwWtDwpaHxS0PihofVDQ+qCg9UFB64OC1gcFrQ8KWh8UtD4oaH1Q0PqgoPVBQeuDgtYHBa0PClofFLQ+KGh9UND6oKD1QUHrg4LWBwWtDwpaHxS0PihofVDQ+qCg9UFB64OC1gcFrQ8KWh8UtD7o59CZyWPn3mrME/IECtEHcoAkCKQAAAAASUVORK5CYII=" mediaID="Left paddle_cst_Untitled"/><costume name="Untitled" center-x="24" center-y="130" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAEDCAYAAABzm4cwAAABPUlEQVR4nO3PMRECAQDEQCTRPiACCUjBCVIPGeGZLdJnL8f2vG+fM3Zsz8tjex/bzthjewMAAAAAAAAAAPzADMAZA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOoA6gDqAOo+w/AbbvettdJu34BzyvOLRxqhP4AAAAASUVORK5CYII=" mediaID="Right paddle_cst_Untitled"/><costume name="Untitled" center-x="16" center-y="15" image="data:image/png;base64,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" mediaID="Ball_cst_Untitled"/><sound name="Pop" sound="http://snap.berkeley.edu/snapsource/Sounds/Pop.wav" mediaID="Ball_snd_Pop"/><sound name="Chord" sound="http://snap.berkeley.edu/snapsource/Sounds/Chord.wav" mediaID="Ball_snd_Chord"/></media></snapdata>