<tokens>
<keyword> class </keyword>
<identifier> Game </identifier>
<symbol> { </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> hbricks </identifier>
<symbol> , </symbol>
<identifier> vbricks </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> gameOver </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<identifier> Rect </identifier>
<identifier> paddle </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<identifier> Ball </identifier>
<identifier> ball </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<identifier> Array </identifier>
<identifier> bricks </identifier>
<symbol> ; </symbol>
<keyword> constructor </keyword>
<identifier> Game </identifier>
<identifier> new </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> i </identifier>
<symbol> , </symbol>
<identifier> j </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<identifier> Rect </identifier>
<identifier> curBrick </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> gameOver </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> hbricks </identifier>
<symbol> = </symbol>
<integerConstant> 8 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> vbricks </identifier>
<symbol> = </symbol>
<integerConstant> 3 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddle </identifier>
<symbol> = </symbol>
<identifier> Rect </identifier>
<symbol> . </symbol>
<identifier> new </identifier>
<symbol> ( </symbol>
<integerConstant> 250 </integerConstant>
<symbol> , </symbol>
<integerConstant> 220 </integerConstant>
<symbol> , </symbol>
<integerConstant> 50 </integerConstant>
<symbol> , </symbol>
<integerConstant> 10 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> ball </identifier>
<symbol> = </symbol>
<identifier> Ball </identifier>
<symbol> . </symbol>
<identifier> new </identifier>
<symbol> ( </symbol>
<integerConstant> 250 </integerConstant>
<symbol> , </symbol>
<integerConstant> 200 </integerConstant>
<symbol> , </symbol>
<integerConstant> 6 </integerConstant>
<symbol> , </symbol>
<integerConstant> 1 </integerConstant>
<symbol> , </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bricks </identifier>
<symbol> = </symbol>
<identifier> Array </identifier>
<symbol> . </symbol>
<identifier> new </identifier>
<symbol> ( </symbol>
<identifier> hbricks </identifier>
<symbol> * </symbol>
<identifier> vbricks </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> while </keyword>
<symbol> ( </symbol>
<identifier> i </identifier>
<symbol> &lt; </symbol>
<identifier> hbricks </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> while </keyword>
<symbol> ( </symbol>
<identifier> j </identifier>
<symbol> &lt; </symbol>
<identifier> vbricks </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> bricks </identifier>
<symbol> [ </symbol>
<identifier> i </identifier>
<symbol> * </symbol>
<integerConstant> 3 </integerConstant>
<symbol> + </symbol>
<identifier> j </identifier>
<symbol> ] </symbol>
<symbol> = </symbol>
<identifier> Rect </identifier>
<symbol> . </symbol>
<identifier> new </identifier>
<symbol> ( </symbol>
<identifier> i </identifier>
<symbol> * </symbol>
<integerConstant> 60 </integerConstant>
<symbol> + </symbol>
<integerConstant> 20 </integerConstant>
<symbol> , </symbol>
<identifier> j </identifier>
<symbol> * </symbol>
<integerConstant> 30 </integerConstant>
<symbol> + </symbol>
<integerConstant> 20 </integerConstant>
<symbol> , </symbol>
<integerConstant> 50 </integerConstant>
<symbol> , </symbol>
<integerConstant> 15 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> curBrick </identifier>
<symbol> = </symbol>
<identifier> bricks </identifier>
<symbol> [ </symbol>
<identifier> i </identifier>
<symbol> * </symbol>
<integerConstant> 3 </integerConstant>
<symbol> + </symbol>
<identifier> j </identifier>
<symbol> ] </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> curBrick </identifier>
<symbol> . </symbol>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> j </identifier>
<symbol> = </symbol>
<identifier> j </identifier>
<symbol> + </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> let </keyword>
<identifier> j </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> i </identifier>
<symbol> = </symbol>
<identifier> i </identifier>
<symbol> + </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> return </keyword>
<keyword> this </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> loop </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> keyPressed </identifier>
<symbol> ; </symbol>
<keyword> while </keyword>
<symbol> ( </symbol>
<keyword> true </keyword>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> Sys </identifier>
<symbol> . </symbol>
<identifier> wait </identifier>
<symbol> ( </symbol>
<integerConstant> 16 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> gameOver </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> movePaddle </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> update </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> chackBallPaddleCol </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> checkBallBricksCol </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> checkGameOver </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> keyPressed </identifier>
<symbol> = </symbol>
<identifier> Keyboard </identifier>
<symbol> . </symbol>
<identifier> keyPressed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> keyPressed </identifier>
<symbol> = </symbol>
<integerConstant> 82 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> resetGame </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> resetGame </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> i </identifier>
<symbol> , </symbol>
<identifier> end </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<identifier> Rect </identifier>
<identifier> brick </identifier>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Screen </identifier>
<symbol> . </symbol>
<identifier> clearScreen </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> setPos </identifier>
<symbol> ( </symbol>
<integerConstant> 250 </integerConstant>
<symbol> , </symbol>
<integerConstant> 220 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> setPos </identifier>
<symbol> ( </symbol>
<integerConstant> 250 </integerConstant>
<symbol> , </symbol>
<integerConstant> 200 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> setSpeed </identifier>
<symbol> ( </symbol>
<integerConstant> 1 </integerConstant>
<symbol> , </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> end </identifier>
<symbol> = </symbol>
<identifier> hbricks </identifier>
<symbol> * </symbol>
<identifier> vbricks </identifier>
<symbol> ; </symbol>
<keyword> while </keyword>
<symbol> ( </symbol>
<identifier> i </identifier>
<symbol> &lt; </symbol>
<identifier> end </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> brick </identifier>
<symbol> = </symbol>
<identifier> bricks </identifier>
<symbol> [ </symbol>
<identifier> i </identifier>
<symbol> ] </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> setHidden </identifier>
<symbol> ( </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> i </identifier>
<symbol> = </symbol>
<identifier> i </identifier>
<symbol> + </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> let </keyword>
<identifier> gameOver </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> checkGameOver </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> bBottom </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bBottom </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getBottom </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> bBottom </identifier>
<symbol> &gt; </symbol>
<integerConstant> 240 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> gameOver </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Output </identifier>
<symbol> . </symbol>
<identifier> moveCursor </identifier>
<symbol> ( </symbol>
<integerConstant> 0 </integerConstant>
<symbol> , </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Output </identifier>
<symbol> . </symbol>
<identifier> println </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Output </identifier>
<symbol> . </symbol>
<identifier> printString </identifier>
<symbol> ( </symbol>
<stringConstant> game over </stringConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Output </identifier>
<symbol> . </symbol>
<identifier> println </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> Output </identifier>
<symbol> . </symbol>
<identifier> printString </identifier>
<symbol> ( </symbol>
<stringConstant> press r to restart </stringConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> movePaddle </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> keyPressed </identifier>
<symbol> , </symbol>
<identifier> paddleLeft </identifier>
<symbol> , </symbol>
<identifier> paddleRight </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> keyPressed </identifier>
<symbol> = </symbol>
<identifier> Keyboard </identifier>
<symbol> . </symbol>
<identifier> keyPressed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleLeft </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleRight </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> keyPressed </identifier>
<symbol> = </symbol>
<integerConstant> 130 </integerConstant>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> paddleLeft </identifier>
<symbol> &gt; </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> moveLeft </identifier>
<symbol> ( </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> keyPressed </identifier>
<symbol> = </symbol>
<integerConstant> 132 </integerConstant>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> paddleRight </identifier>
<symbol> &lt; </symbol>
<integerConstant> 510 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> moveRight </identifier>
<symbol> ( </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> do </keyword>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> chackBallPaddleCol </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> paddleLeft </identifier>
<symbol> , </symbol>
<identifier> paddleRight </identifier>
<symbol> , </symbol>
<identifier> paddleTop </identifier>
<symbol> , </symbol>
<identifier> paddleBottom </identifier>
<symbol> , </symbol>
<identifier> paddleMiddle </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> bLeft </identifier>
<symbol> , </symbol>
<identifier> bRight </identifier>
<symbol> , </symbol>
<identifier> bTop </identifier>
<symbol> , </symbol>
<identifier> bBottom </identifier>
<symbol> , </symbol>
<identifier> bMiddle </identifier>
<symbol> , </symbol>
<identifier> bVspeed </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleLeft </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleRight </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleTop </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getTop </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleBottom </identifier>
<symbol> = </symbol>
<identifier> paddle </identifier>
<symbol> . </symbol>
<identifier> getBottom </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> paddleMiddle </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> paddleRight </identifier>
<symbol> + </symbol>
<identifier> paddleLeft </identifier>
<symbol> ) </symbol>
<symbol> / </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bLeft </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bRight </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bTop </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getTop </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bBottom </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getBottom </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bMiddle </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> bRight </identifier>
<symbol> + </symbol>
<identifier> bLeft </identifier>
<symbol> ) </symbol>
<symbol> / </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bVspeed </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getVspeed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> bLeft </identifier>
<symbol> &gt; </symbol>
<identifier> paddleLeft </identifier>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bRight </identifier>
<symbol> &lt; </symbol>
<identifier> paddleRight </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> bBottom </identifier>
<symbol> &gt; </symbol>
<identifier> paddleTop </identifier>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bVspeed </identifier>
<symbol> &gt; </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> bMiddle </identifier>
<symbol> &gt; </symbol>
<identifier> paddleMiddle </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> setSpeed </identifier>
<symbol> ( </symbol>
<integerConstant> 1 </integerConstant>
<symbol> , </symbol>
<symbol> - </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> setSpeed </identifier>
<symbol> ( </symbol>
<symbol> - </symbol>
<integerConstant> 1 </integerConstant>
<symbol> , </symbol>
<symbol> - </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> checkBallBricksCol </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> brLeft </identifier>
<symbol> , </symbol>
<identifier> brRight </identifier>
<symbol> , </symbol>
<identifier> brTop </identifier>
<symbol> , </symbol>
<identifier> brBottom </identifier>
<symbol> , </symbol>
<identifier> brHidden </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> bLeft </identifier>
<symbol> , </symbol>
<identifier> bRight </identifier>
<symbol> , </symbol>
<identifier> bTop </identifier>
<symbol> , </symbol>
<identifier> bBottom </identifier>
<symbol> , </symbol>
<identifier> bVspeed </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> overlapLeft </identifier>
<symbol> , </symbol>
<identifier> overlapRight </identifier>
<symbol> , </symbol>
<identifier> overlapTop </identifier>
<symbol> , </symbol>
<identifier> overlapBottom </identifier>
<symbol> , </symbol>
<identifier> fromLeft </identifier>
<symbol> , </symbol>
<identifier> fromTop </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> minOverlapX </identifier>
<symbol> , </symbol>
<identifier> minOverlapY </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> i </identifier>
<symbol> , </symbol>
<identifier> end </identifier>
<symbol> ; </symbol>
<keyword> var </keyword>
<identifier> Rect </identifier>
<identifier> brick </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bLeft </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bRight </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bTop </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getTop </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bBottom </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getBottom </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bVspeed </identifier>
<symbol> = </symbol>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> getVspeed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> end </identifier>
<symbol> = </symbol>
<identifier> hbricks </identifier>
<symbol> * </symbol>
<identifier> vbricks </identifier>
<symbol> ; </symbol>
<keyword> while </keyword>
<symbol> ( </symbol>
<identifier> i </identifier>
<symbol> &lt; </symbol>
<identifier> end </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> brick </identifier>
<symbol> = </symbol>
<identifier> bricks </identifier>
<symbol> [ </symbol>
<identifier> i </identifier>
<symbol> ] </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> brLeft </identifier>
<symbol> = </symbol>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> brRight </identifier>
<symbol> = </symbol>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> brTop </identifier>
<symbol> = </symbol>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> getTop </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> brBottom </identifier>
<symbol> = </symbol>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> getBottom </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> brHidden </identifier>
<symbol> = </symbol>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> getHidden </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> brHidden </identifier>
<symbol> &lt; </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> bLeft </identifier>
<symbol> &gt; </symbol>
<identifier> brLeft </identifier>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bRight </identifier>
<symbol> &lt; </symbol>
<identifier> brRight </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> bBottom </identifier>
<symbol> &gt; </symbol>
<identifier> brTop </identifier>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bTop </identifier>
<symbol> &lt; </symbol>
<identifier> brBottom </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> setHidden </identifier>
<symbol> ( </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> brick </identifier>
<symbol> . </symbol>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> overlapLeft </identifier>
<symbol> = </symbol>
<identifier> bRight </identifier>
<symbol> - </symbol>
<identifier> brLeft </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> overlapRight </identifier>
<symbol> = </symbol>
<identifier> brRight </identifier>
<symbol> - </symbol>
<identifier> bLeft </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> overlapTop </identifier>
<symbol> = </symbol>
<identifier> bBottom </identifier>
<symbol> - </symbol>
<identifier> brTop </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> overlapBottom </identifier>
<symbol> = </symbol>
<identifier> brBottom </identifier>
<symbol> - </symbol>
<identifier> bTop </identifier>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> overlapLeft </identifier>
<symbol> ) </symbol>
<symbol> &lt; </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> overlapRight </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> fromLeft </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> minOverlapX </identifier>
<symbol> = </symbol>
<identifier> overlapLeft </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> minOverlapX </identifier>
<symbol> = </symbol>
<identifier> overlapRight </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> overlapTop </identifier>
<symbol> ) </symbol>
<symbol> &lt; </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> overlapBottom </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> fromTop </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> minOverlapY </identifier>
<symbol> = </symbol>
<identifier> overlapTop </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> minOverlapY </identifier>
<symbol> = </symbol>
<identifier> overlapBottom </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> minOverlapX </identifier>
<symbol> ) </symbol>
<symbol> &lt; </symbol>
<identifier> Util </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> minOverlapY </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> invertHspeed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> ball </identifier>
<symbol> . </symbol>
<identifier> invertVspeed </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> let </keyword>
<identifier> i </identifier>
<symbol> = </symbol>
<identifier> i </identifier>
<symbol> + </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
</tokens>
