<tokens>
<keyword> class </keyword>
<identifier> Ball </identifier>
<symbol> { </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> x </identifier>
<symbol> , </symbol>
<identifier> y </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> lengthx </identifier>
<symbol> , </symbol>
<identifier> lengthy </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> d </identifier>
<symbol> , </symbol>
<identifier> straightD </identifier>
<symbol> , </symbol>
<identifier> diagonalD </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> boolean </keyword>
<identifier> invert </identifier>
<symbol> , </symbol>
<identifier> positivex </identifier>
<symbol> , </symbol>
<identifier> positivey </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> leftWall </identifier>
<symbol> , </symbol>
<identifier> rightWall </identifier>
<symbol> , </symbol>
<identifier> topWall </identifier>
<symbol> , </symbol>
<identifier> bottomWall </identifier>
<symbol> ; </symbol>
<keyword> field </keyword>
<keyword> int </keyword>
<identifier> wall </identifier>
<symbol> ; </symbol>
<keyword> constructor </keyword>
<identifier> Ball </identifier>
<identifier> new </identifier>
<symbol> ( </symbol>
<keyword> int </keyword>
<identifier> Ax </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> Ay </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> AleftWall </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> ArightWall </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> AtopWall </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> AbottomWall </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> Ax </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> Ay </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> leftWall </identifier>
<symbol> = </symbol>
<identifier> AleftWall </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> rightWall </identifier>
<symbol> = </symbol>
<identifier> ArightWall </identifier>
<symbol> - </symbol>
<integerConstant> 6 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> topWall </identifier>
<symbol> = </symbol>
<identifier> AtopWall </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> bottomWall </identifier>
<symbol> = </symbol>
<identifier> AbottomWall </identifier>
<symbol> - </symbol>
<integerConstant> 6 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> show </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<keyword> this </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> dispose </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> Memory </identifier>
<symbol> . </symbol>
<identifier> deAlloc </identifier>
<symbol> ( </symbol>
<keyword> this </keyword>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> show </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> Screen </identifier>
<symbol> . </symbol>
<identifier> setColor </identifier>
<symbol> ( </symbol>
<keyword> true </keyword>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> hide </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> Screen </identifier>
<symbol> . </symbol>
<identifier> setColor </identifier>
<symbol> ( </symbol>
<keyword> false </keyword>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> do </keyword>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> draw </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> Screen </identifier>
<symbol> . </symbol>
<identifier> drawRectangle </identifier>
<symbol> ( </symbol>
<identifier> x </identifier>
<symbol> , </symbol>
<identifier> y </identifier>
<symbol> , </symbol>
<identifier> x </identifier>
<symbol> + </symbol>
<integerConstant> 5 </integerConstant>
<symbol> , </symbol>
<identifier> y </identifier>
<symbol> + </symbol>
<integerConstant> 5 </integerConstant>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> int </keyword>
<identifier> getLeft </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> return </keyword>
<identifier> x </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> int </keyword>
<identifier> getRight </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> return </keyword>
<identifier> x </identifier>
<symbol> + </symbol>
<integerConstant> 5 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> setDestination </identifier>
<symbol> ( </symbol>
<keyword> int </keyword>
<identifier> destx </identifier>
<symbol> , </symbol>
<keyword> int </keyword>
<identifier> desty </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> dx </identifier>
<symbol> , </symbol>
<identifier> dy </identifier>
<symbol> , </symbol>
<identifier> temp </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> lengthx </identifier>
<symbol> = </symbol>
<identifier> destx </identifier>
<symbol> - </symbol>
<identifier> x </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> lengthy </identifier>
<symbol> = </symbol>
<identifier> desty </identifier>
<symbol> - </symbol>
<identifier> y </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> dx </identifier>
<symbol> = </symbol>
<identifier> Math </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> lengthx </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> dy </identifier>
<symbol> = </symbol>
<identifier> Math </identifier>
<symbol> . </symbol>
<identifier> abs </identifier>
<symbol> ( </symbol>
<identifier> lengthy </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> invert </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> dx </identifier>
<symbol> &lt; </symbol>
<identifier> dy </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> invert </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> temp </identifier>
<symbol> = </symbol>
<identifier> dx </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> dx </identifier>
<symbol> = </symbol>
<identifier> dy </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> dy </identifier>
<symbol> = </symbol>
<identifier> temp </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> positivex </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> y </identifier>
<symbol> &lt; </symbol>
<identifier> desty </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> positivey </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> x </identifier>
<symbol> &lt; </symbol>
<identifier> destx </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> positivex </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> x </identifier>
<symbol> &lt; </symbol>
<identifier> destx </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> positivey </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> y </identifier>
<symbol> &lt; </symbol>
<identifier> desty </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> let </keyword>
<identifier> d </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<integerConstant> 2 </integerConstant>
<symbol> * </symbol>
<identifier> dy </identifier>
<symbol> ) </symbol>
<symbol> - </symbol>
<identifier> dx </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> straightD </identifier>
<symbol> = </symbol>
<integerConstant> 2 </integerConstant>
<symbol> * </symbol>
<identifier> dy </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> diagonalD </identifier>
<symbol> = </symbol>
<integerConstant> 2 </integerConstant>
<symbol> * </symbol>
<symbol> ( </symbol>
<identifier> dy </identifier>
<symbol> - </symbol>
<identifier> dx </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> int </keyword>
<identifier> move </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> do </keyword>
<identifier> hide </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> d </identifier>
<symbol> &lt; </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> d </identifier>
<symbol> = </symbol>
<identifier> d </identifier>
<symbol> + </symbol>
<identifier> straightD </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> d </identifier>
<symbol> = </symbol>
<identifier> d </identifier>
<symbol> + </symbol>
<identifier> diagonalD </identifier>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> positivey </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> invert </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> + </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> + </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> invert </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> - </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> - </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> positivex </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> invert </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> + </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> + </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> invert </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> - </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> - </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ~ </symbol>
<symbol> ( </symbol>
<identifier> x </identifier>
<symbol> &gt; </symbol>
<identifier> leftWall </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> leftWall </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ~ </symbol>
<symbol> ( </symbol>
<identifier> x </identifier>
<symbol> &lt; </symbol>
<identifier> rightWall </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> x </identifier>
<symbol> = </symbol>
<identifier> rightWall </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ~ </symbol>
<symbol> ( </symbol>
<identifier> y </identifier>
<symbol> &gt; </symbol>
<identifier> topWall </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 3 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> topWall </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ~ </symbol>
<symbol> ( </symbol>
<identifier> y </identifier>
<symbol> &lt; </symbol>
<identifier> bottomWall </identifier>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 4 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> y </identifier>
<symbol> = </symbol>
<identifier> bottomWall </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> do </keyword>
<identifier> show </identifier>
<symbol> ( </symbol>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<identifier> wall </identifier>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> method </keyword>
<keyword> void </keyword>
<identifier> bounce </identifier>
<symbol> ( </symbol>
<keyword> int </keyword>
<identifier> bouncingDirection </identifier>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> var </keyword>
<keyword> int </keyword>
<identifier> newx </identifier>
<symbol> , </symbol>
<identifier> newy </identifier>
<symbol> , </symbol>
<identifier> divLengthx </identifier>
<symbol> , </symbol>
<identifier> divLengthy </identifier>
<symbol> , </symbol>
<identifier> factor </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> divLengthx </identifier>
<symbol> = </symbol>
<identifier> lengthx </identifier>
<symbol> / </symbol>
<integerConstant> 10 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> divLengthy </identifier>
<symbol> = </symbol>
<identifier> lengthy </identifier>
<symbol> / </symbol>
<integerConstant> 10 </integerConstant>
<symbol> ; </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> bouncingDirection </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> factor </identifier>
<symbol> = </symbol>
<integerConstant> 10 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<symbol> ( </symbol>
<symbol> ( </symbol>
<symbol> ~ </symbol>
<symbol> ( </symbol>
<identifier> lengthx </identifier>
<symbol> &lt; </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bouncingDirection </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> | </symbol>
<symbol> ( </symbol>
<symbol> ( </symbol>
<identifier> lengthx </identifier>
<symbol> &lt; </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ) </symbol>
<symbol> &amp; </symbol>
<symbol> ( </symbol>
<identifier> bouncingDirection </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<symbol> - </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> factor </identifier>
<symbol> = </symbol>
<integerConstant> 20 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> factor </identifier>
<symbol> = </symbol>
<integerConstant> 5 </integerConstant>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 1 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<integerConstant> 506 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> divLengthy </identifier>
<symbol> * </symbol>
<symbol> ( </symbol>
<symbol> - </symbol>
<integerConstant> 50 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> / </symbol>
<identifier> divLengthx </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> + </symbol>
<symbol> ( </symbol>
<identifier> newy </identifier>
<symbol> * </symbol>
<identifier> factor </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 2 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> divLengthy </identifier>
<symbol> * </symbol>
<integerConstant> 50 </integerConstant>
<symbol> ) </symbol>
<symbol> / </symbol>
<identifier> divLengthx </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<identifier> y </identifier>
<symbol> + </symbol>
<symbol> ( </symbol>
<identifier> newy </identifier>
<symbol> * </symbol>
<identifier> factor </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> if </keyword>
<symbol> ( </symbol>
<identifier> wall </identifier>
<symbol> = </symbol>
<integerConstant> 3 </integerConstant>
<symbol> ) </symbol>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<integerConstant> 250 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> divLengthx </identifier>
<symbol> * </symbol>
<symbol> ( </symbol>
<symbol> - </symbol>
<integerConstant> 25 </integerConstant>
<symbol> ) </symbol>
<symbol> ) </symbol>
<symbol> / </symbol>
<identifier> divLengthy </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> + </symbol>
<symbol> ( </symbol>
<identifier> newx </identifier>
<symbol> * </symbol>
<identifier> factor </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<keyword> else </keyword>
<symbol> { </symbol>
<keyword> let </keyword>
<identifier> newy </identifier>
<symbol> = </symbol>
<integerConstant> 0 </integerConstant>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<symbol> ( </symbol>
<identifier> divLengthx </identifier>
<symbol> * </symbol>
<integerConstant> 25 </integerConstant>
<symbol> ) </symbol>
<symbol> / </symbol>
<identifier> divLengthy </identifier>
<symbol> ; </symbol>
<keyword> let </keyword>
<identifier> newx </identifier>
<symbol> = </symbol>
<identifier> x </identifier>
<symbol> + </symbol>
<symbol> ( </symbol>
<identifier> newx </identifier>
<symbol> * </symbol>
<identifier> factor </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
<keyword> do </keyword>
<identifier> setDestination </identifier>
<symbol> ( </symbol>
<identifier> newx </identifier>
<symbol> , </symbol>
<identifier> newy </identifier>
<symbol> ) </symbol>
<symbol> ; </symbol>
<keyword> return </keyword>
<symbol> ; </symbol>
<symbol> } </symbol>
<symbol> } </symbol>
</tokens>
