<?xml version="1.0" encoding="UTF-16"?>
<!-- This XML file has been created by Easy Java(script) Simulations (EjsS). Visit http://www.um.es/fem/Ejs. -->
<!-- Please, save the file to your hard disk on your Ejs' user directory and open it with Ejs. -->
<Osejs version="6.0" password="">
<Osejs.Information>
<Title><![CDATA[Physics Frogger]]></Title>
<Copyright><![CDATA[Aaron Titus and Francisco Esquembre]]></Copyright>
<Keywords><![CDATA[coordinates, vectors, frogger]]></Keywords>
<Password><![CDATA[]]></Password>
<Level><![CDATA[introductory]]></Level>
<Language><![CDATA[]]></Language>
<Abstract><![CDATA[This games is inspired by Frogger which was created by Konami.]]></Abstract>
<ExecPassword><![CDATA[]]></ExecPassword>
<CaptureTools>false</CaptureTools>
<DataTools>false</DataTools>
<LanguageTools>false</LanguageTools>
<AppletColSupport>false</AppletColSupport>
<UseMacMenuBar>false</UseMacMenuBar>
<FixedNavigationBar>false</FixedNavigationBar>
<RunInBrowserFirst>true</RunInBrowserFirst>
<RunAlways>true</RunAlways>
<UseInterpreter>true</UseInterpreter>
<UseDeltaForODE>false</UseDeltaForODE>
<ModelTab></ModelTab>
<ModelTabTitle><![CDATA[]]></ModelTabTitle>
<ModelName><![CDATA[]]></ModelName>
<CSSFile></CSSFile>
<StaticImages>
</StaticImages>
<HTMLHead><![CDATA[<script async="true" src="https://www.googletagmanager.com/gtag/js?id=UA-3326007-19"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-3326007-19');
</script>
<script data-ad-client="ca-pub-0121577198857509" async="true" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>]]></HTMLHead>
<Logo>./pvg_frogger/logo.png</Logo>
<Author><![CDATA[Aaron Titus; Francisco Esquembre]]></Author>
<AuthorLogo>./common_files/AaronTitus2015.png;./common_files/PacoEsquembre2011.png</AuthorLogo>
<AdditionalLibraries>
</AdditionalLibraries>
<ImportStatements>
</ImportStatements>
<ClassesRequired>
</ClassesRequired>
<ManifestLines><![CDATA[Permissions: sandbox
Codebase: *
Caller-Allowable-Codebase: *
]]></ManifestLines>
<DetectedFiles><![CDATA[./common_files/AaronTitus2015.png;./common_files/PacoEsquembre2011.png;./common_files/pvg_book_page.xhtml;./common_files/pvg_title.png;./pvg_frogger/boat.png;./pvg_frogger/brickpath.png;./pvg_frogger/car.png;./pvg_frogger/danger.png;./pvg_frogger/kumoi_bike.png;./pvg_frogger/log-maple-long.png;./pvg_frogger/log-oak-short.png;./pvg_frogger/logo.png;./pvg_frogger/pvg_frogger_credits.xhtml;./pvg_frogger/pvg_frogger_instructions.xhtml;./pvg_frogger/red-stockcar.png;./pvg_frogger/stockcar.png;./pvg_frogger/truck.png;]]></DetectedFiles>
<AuxiliaryFiles><![CDATA[./pvg_frogger/;]]></AuxiliaryFiles>
</Osejs.Information>
<Osejs.Description>
<Osejs.Description.Page>
<Type>DESCRIPTION_EDITOR</Type>
<Name>Game instructions</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<OneHTMLPage>
  <Locale>_default_</Locale>
  <Title>Game instructions</Title>
  <External>true</External>
  <![CDATA[
./pvg_frogger/pvg_frogger_instructions.xhtml
]]>
</OneHTMLPage>
</Content>
</Osejs.Description.Page>
<Osejs.Description.Page>
<Type>DESCRIPTION_EDITOR</Type>
<Name>Credits</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<OneHTMLPage>
  <Locale>_default_</Locale>
  <Title>Credits</Title>
  <External>true</External>
  <![CDATA[
./pvg_frogger/pvg_frogger_credits.xhtml
]]>
</OneHTMLPage>
</Content>
</Osejs.Description.Page>
<Osejs.Description.Page>
<Type>DESCRIPTION_EDITOR</Type>
<Name>eBook</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<OneHTMLPage>
  <Locale>_default_</Locale>
  <Title>eBook</Title>
  <External>true</External>
  <![CDATA[
./common_files/pvg_book_page.xhtml
]]>
</OneHTMLPage>
</Content>
</Osejs.Description.Page>
</Osejs.Description>
<Osejs.Model>
<Osejs.Model.FramesPerSecond>20</Osejs.Model.FramesPerSecond>
<Osejs.Model.StepsPerDisplay>1</Osejs.Model.StepsPerDisplay>
<Osejs.Model.RealTimeVariable></Osejs.Model.RealTimeVariable>
<Osejs.Model.Autostart>true</Osejs.Model.Autostart>
<Osejs.Model.Variables>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>World</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[displayScale]]></Name>
<Value><![CDATA[3.0/4.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[factorTo10]]></Name>
<Value><![CDATA[56.25/100.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[xMin]]></Name>
<Value><![CDATA[-100*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[xMax]]></Name>
<Value><![CDATA[100*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[xRange]]></Name>
<Value><![CDATA[xMax-xMin]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yMin]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yMax]]></Name>
<Value><![CDATA[yMin + xRange/displayScale]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yRange]]></Name>
<Value><![CDATA[yMax-yMin]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[xMiddle]]></Name>
<Value><![CDATA[(xMin+xMax)/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yMiddle]]></Name>
<Value><![CDATA[(yMin+yMax)/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[time]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[deltaTime]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[maxTime]]></Name>
<Value><![CDATA[Number.POSITIVE_INFINITY]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[counter]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[running]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameOver]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[replay]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[randomGenerator]]></Name>
<Value><![CDATA[RNG()]]></Value>
<Type><![CDATA[Object]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Display</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[SHOW_SCORES]]></Name>
<Value><![CDATA[true]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[SHOW_AUTOPLAY]]></Name>
<Value><![CDATA[true]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[FULL_AUTOPLAY]]></Name>
<Value><![CDATA[true]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[NO_MOVE]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[LEFT_MOVE]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[RIGHT_MOVE]]></Name>
<Value><![CDATA[2]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[DOWN_MOVE]]></Name>
<Value><![CDATA[3]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[UP_MOVE]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[rows]]></Name>
<Value><![CDATA[15]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[rowHeight]]></Name>
<Value><![CDATA[(yMax-yMin)/rows]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[rowBorder]]></Name>
<Value><![CDATA[0.1*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[tol]]></Name>
<Value><![CDATA[rowHeight/5]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[roadHeight]]></Name>
<Value><![CDATA[5*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[sandHeight]]></Name>
<Value><![CDATA[rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[roadBottom]]></Name>
<Value><![CDATA[yMin+rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[waterHeight]]></Name>
<Value><![CDATA[5*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[sandBottom]]></Name>
<Value><![CDATA[roadBottom+roadHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[waterBottom]]></Name>
<Value><![CDATA[sandBottom+sandHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[waterTop]]></Name>
<Value><![CDATA[waterBottom + waterHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Instructions</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[messageY]]></Name>
<Value><![CDATA[sandBottom+sandHeight/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[scoreY]]></Name>
<Value><![CDATA[waterTop+1*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[actionsY]]></Name>
<Value><![CDATA[scoreY+1.75*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[resetX]]></Name>
<Value><![CDATA[xMin+xRange/8]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[replayX]]></Name>
<Value><![CDATA[xMax-xRange/8]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[autoplayX]]></Name>
<Value><![CDATA[xMiddle]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[startMessage]]></Name>
<Value><![CDATA["Click or Tap to Start"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[message to start the game]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[playAgainMessage]]></Name>
<Value><![CDATA["Click or Tap to Play Again"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameWonMessage]]></Name>
<Value><![CDATA["You Win"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[message when aliens are shot]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameTiedMessage]]></Name>
<Value><![CDATA["You ended on a lilly, but not the yellow lilly"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameRecordMessage]]></Name>
<Value><![CDATA["You Win with a NEW RECORD"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameLostMessage]]></Name>
<Value><![CDATA["You Lost"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameOverMessage]]></Name>
<Value><![CDATA["GAME OVER"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[message when game is lost]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[gameResultMessage]]></Name>
<Value><![CDATA[gameLostMessage]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[message]]></Name>
<Value><![CDATA[startMessage]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[variable for the message to display]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[DEAD_ON_ROAD]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[DEAD_ON_WATER]]></Name>
<Value><![CDATA[2]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[SAFE_ON_LILLY]]></Name>
<Value><![CDATA[3]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[SAFE_ON_PREFERRED_LILLY]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[score]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bestScore]]></Name>
<Value><![CDATA[Number.POSITIVE_INFINITY]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bestTime]]></Name>
<Value><![CDATA[Number.POSITIVE_INFINITY]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[scoreText]]></Name>
<Value><![CDATA["Score text"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[recordText]]></Name>
<Value><![CDATA["Record text"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[autoplayOption]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[autoplayText]]></Name>
<Value><![CDATA["None"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[userAutoplayShowDialog]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[userAutoplayString]]></Name>
<Value><![CDATA[""]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[userAutoplayFunction]]></Name>
<Value><![CDATA[undefined]]></Value>
<Type><![CDATA[Object]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[optimalJumps]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[[0]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatInPlace]]></Name>
<Value><![CDATA[-1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[willKillYou]]></Name>
<Value><![CDATA[[0,0]]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[2]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[willDie]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Frog</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[frogInitial]]></Name>
<Value><![CDATA[roadBottom - 0.5*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogLastPos]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogPos]]></Name>
<Value><![CDATA[[xMiddle,frogInitial]]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[2]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogVx]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogJumpSize]]></Name>
<Value><![CDATA[rowHeight]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[smfrogimage]]></Name>
<Value><![CDATA["./pvg_frogger/frog-sm.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[medfrogimage]]></Name>
<Value><![CDATA["./pvg_frogger/frog-med.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[deadImage]]></Name>
<Value><![CDATA["./pvg_frogger/splat.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[drownImage]]></Name>
<Value><![CDATA["./pvg_frogger/bubbles.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogimage]]></Name>
<Value><![CDATA[smfrogimage]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogWidth]]></Name>
<Value><![CDATA[0.9*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogHeight]]></Name>
<Value><![CDATA[frogWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[frogAngle]]></Name>
<Value><![CDATA[Math.PI/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Ponds & Pads</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[numPonds]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[pondX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numPonds]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[pondY]]></Name>
<Value><![CDATA[frogInitial+12*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[pondWidth]]></Name>
<Value><![CDATA[2*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[pondHeight]]></Name>
<Value><![CDATA[rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numPads]]></Name>
<Value><![CDATA[numPonds]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padImage]]></Name>
<Value><![CDATA["./pvg_frogger/lillypad.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[[numPads]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numPads]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padY]]></Name>
<Value><![CDATA[pondY]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padWidth]]></Name>
<Value><![CDATA[0.8*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padHeight]]></Name>
<Value><![CDATA[padWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[padPreferred]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Cars</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[numRaceCars]]></Name>
<Value><![CDATA[2]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[number of race cars]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numRaceCars]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarY]]></Name>
<Value><![CDATA[frogInitial+rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarVx]]></Name>
<Value><![CDATA[-2*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarHeight]]></Name>
<Value><![CDATA[0.9*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarWidth]]></Name>
<Value><![CDATA[1.25*raceCarHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[raceCarSpacing]]></Name>
<Value><![CDATA[raceCarWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numYellowCars]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[number of yellow cars]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numYellowCars]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarY]]></Name>
<Value><![CDATA[frogInitial+2*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarVx]]></Name>
<Value><![CDATA[2*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarHeight]]></Name>
<Value><![CDATA[0.8*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarWidth]]></Name>
<Value><![CDATA[1.75*yellowCarHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[yellowCarSpacing]]></Name>
<Value><![CDATA[yellowCarWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numRedCars]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numRedCars]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarY]]></Name>
<Value><![CDATA[frogInitial+5*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarVx]]></Name>
<Value><![CDATA[-1.5*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarHeight]]></Name>
<Value><![CDATA[0.8*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarWidth]]></Name>
<Value><![CDATA[1.75*redCarHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[redCarSpacing]]></Name>
<Value><![CDATA[redCarWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Trucks & Bikes</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[numTrucks]]></Name>
<Value><![CDATA[1]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numTrucks]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckY]]></Name>
<Value><![CDATA[frogInitial+3*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckVx]]></Name>
<Value><![CDATA[-1*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckHeight]]></Name>
<Value><![CDATA[0.9*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckWidth]]></Name>
<Value><![CDATA[3*truckHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[truckSpacing]]></Name>
<Value><![CDATA[truckWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numBikes]]></Name>
<Value><![CDATA[2]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numBikes]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeY]]></Name>
<Value><![CDATA[frogInitial+4*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeVx]]></Name>
<Value><![CDATA[3*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeHeight]]></Name>
<Value><![CDATA[0.4*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeWidth]]></Name>
<Value><![CDATA[2*bikeHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[bikeSpacing]]></Name>
<Value><![CDATA[2*bikeWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Logs & Boats</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[numMapleLogs]]></Name>
<Value><![CDATA[3]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numMapleLogs]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogY]]></Name>
<Value><![CDATA[frogInitial+9*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogVx]]></Name>
<Value><![CDATA[-2*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogHeight]]></Name>
<Value><![CDATA[0.7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogWidth]]></Name>
<Value><![CDATA[6*mapleLogHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[mapleLogSpacing]]></Name>
<Value><![CDATA[0.75*mapleLogWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numOakLogs]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numOakLogs]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogY]]></Name>
<Value><![CDATA[frogInitial+7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogVx]]></Name>
<Value><![CDATA[-1*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogHeight]]></Name>
<Value><![CDATA[0.7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogWidth]]></Name>
<Value><![CDATA[2*oakLogHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[oakLogSpacing]]></Name>
<Value><![CDATA[oakLogWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numBoats]]></Name>
<Value><![CDATA[3]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numBoats]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatY]]></Name>
<Value><![CDATA[frogInitial+11*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatVx]]></Name>
<Value><![CDATA[-3*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatHeight]]></Name>
<Value><![CDATA[0.7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatWidth]]></Name>
<Value><![CDATA[4*boatHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatXmin]]></Name>
<Value><![CDATA[xMin-boatWidth/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatXmax]]></Name>
<Value><![CDATA[xMax+boatWidth/2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[boatSpacing]]></Name>
<Value><![CDATA[0.75*boatWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>Fish & Turtles</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[numFishGroups]]></Name>
<Value><![CDATA[2]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numFishPerGroup]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numFish]]></Name>
<Value><![CDATA[numFishGroups*numFishPerGroup]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numFish]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishY]]></Name>
<Value><![CDATA[frogInitial+10*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishVx]]></Name>
<Value><![CDATA[0.75*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishHeight]]></Name>
<Value><![CDATA[0.7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishWidth]]></Name>
<Value><![CDATA[2*fishHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishSpacing]]></Name>
<Value><![CDATA[3*fishWidth]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishImageSwim1]]></Name>
<Value><![CDATA["./pvg_frogger/fish-left.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishImageSwim2]]></Name>
<Value><![CDATA["./pvg_frogger/fish-right.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[fishImage]]></Name>
<Value><![CDATA[fishImageSwim1]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numTurtleGroups]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numTurtlesPerGroup]]></Name>
<Value><![CDATA[4]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[numTurtles]]></Name>
<Value><![CDATA[numTurtleGroups*numTurtlesPerGroup]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleX]]></Name>
<Value><![CDATA[0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[[numTurtles]]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleY]]></Name>
<Value><![CDATA[frogInitial+8*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleVx]]></Name>
<Value><![CDATA[1*factorTo10]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleHeight]]></Name>
<Value><![CDATA[0.7*rowHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleWidth]]></Name>
<Value><![CDATA[turtleHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleSpacing]]></Name>
<Value><![CDATA[2*turtleHeight]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleImage1]]></Name>
<Value><![CDATA["./pvg_frogger/turtle-01.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleImage2]]></Name>
<Value><![CDATA["./pvg_frogger/turtle-02.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleImage3]]></Name>
<Value><![CDATA["./pvg_frogger/turtle-03.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[turtleImage]]></Name>
<Value><![CDATA["./pvg_frogger/turtle-01.png"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Domain><![CDATA[public]]></Domain>
<Comment><![CDATA[]]></Comment>
</Variable>
</Content>
</Osejs.Model.Variables.Page>
</Osejs.Model.Variables>
<Osejs.Model.Initialization>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>First tasks</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
initializeKeyboardEvents(); // See "Keyboard" custom page

if (replay) randomGenerator.reset(); // See "Random" custom page
else randomGenerator.setResetState();

var userPlay = 
  "/**\n"+
  "  * User autoplay function\n"+
  "  * When User autoplay is selected, this function is called to move the frog in\n"+
  "  * each game step, after all other objects are in place.\n"+
  "  *\n"+
  "  * Here are some predefined functions that you can use in your autoplay strategy:\n"+
  "  * - getLocationFromFrog(jumps); The jumps parameter is an array of predefined integers\n"+
  "  *     codes NO_MOVE, LEFT_MOVE, RIGHT_MOVE, DOWN_MOVE, and UP_MOVE. \n"+
  "  * - isFrogCrossingRoad(); Whether the frog is now on the road. \n"+
  "  * - isFrogReadyToCrossRoad(); Whether the frog is less than one jump up from the road.\n"+
  "  * - isFrogCrossingWater(); Whether the frog is now on the water.\n"+
  "  * - isFrogReadyToCrossWater(); Whether the frog is less than one jump up from the shore.\n"+
  "  * - isRoadLocationSafe (location); location is a double[2] array with the coordinates\n"+
  "  *     of the location (use getLocationFromFrog()).\n"+
  "  * - isWaterLocationSafe (location); location as in isRoadLocationSafe().\n"+
  "  * - directionOfMotion(location); location as in isRoadLocationSafe().\n"+
  "  *      Returns one of NO_MOVE, LEFT_MOVE, or RIGHT_MOVE.\n"+
  "  * - moveSpriteTo (direction); Moves the frog in the given direction. direction must be\n"+
  "  *     one of NO_MOVE, LEFT_MOVE, RIGHT_MOVE, DOWN_MOVE, or UP_MOVE.\n"+
  "  */\n"+
  " userAutoplayFunction = function() {\n"+
  "  ; // Do nothing\n"+
  "}";

_view.autoplayTextArea.setValue(userPlay);

]]></Code>
</Content>
</Osejs.Model.Initialization.Page>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>Ponds</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
var x = xMin + xRange/8;
var dx = xRange/4;
for (var i=0; i<numPonds; i++, x+=dx) {
  padX[i] = pondX[i] = x;
  padImage[i] = "./pvg_frogger/lillypad.png";
}

padPreferred = getRandomInteger(0,numPads-1);
padImage[padPreferred] = "./pvg_frogger/lillypad_yellow.png";


]]></Code>
</Content>
</Osejs.Model.Initialization.Page>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>Road objects</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
var i;

raceCarX[0] = xMin-raceCarWidth/2;
for (i=1; i<numRaceCars; i++) raceCarX[i] = raceCarX[i-1] + getRandomDouble(2,4)*raceCarSpacing;
  
yellowCarX[0] = xMax+yellowCarWidth/2;
for (i=1; i<numYellowCars; i++) yellowCarX[i] = yellowCarX[i-1] - getRandomDouble(2,4)*yellowCarSpacing;

redCarX[0] = xMin-redCarWidth/2;
for (i=1; i<numRedCars; i++) redCarX[i] = redCarX[i-1] + getRandomDouble(2,4)*redCarSpacing;

truckX[0] = xMin-truckWidth/2;
for (i=1; i<numTrucks; i++) truckX[i] = truckX[i-1] + getRandomDouble(2,4)*truckSpacing;

bikeX[0] = xMax+bikeWidth/2;
for (i=1; i<numBikes; i++) bikeX[i] = bikeX[i-1] - getRandomDouble(2,4)*bikeSpacing;



]]></Code>
</Content>
</Osejs.Model.Initialization.Page>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>Water objects</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
var i,j;
var index=0;
var xStart;

mapleLogX[0] = xMin-mapleLogWidth/2;
for (i=1; i<numMapleLogs; i++) mapleLogX[i] = mapleLogX[i-1] + getRandomDouble(2,4)*mapleLogSpacing;

oakLogX[0] = xMin-oakLogWidth/2;
for (i=1; i<numOakLogs; i++) oakLogX[i] = oakLogX[i-1] + getRandomDouble(2,4)*oakLogSpacing;

boatX[0] = xMin-boatWidth/2;
for (i=1; i<numBoats; i++) boatX[i] = boatX[i-1] + getRandomDouble(2,4)*boatSpacing;

xStart = xMax - fishSpacing;
for (j=0; j<numFishGroups; j++) {
  fishX[j*numFishPerGroup] = xStart;
  for (i=1; i<numFishPerGroup; i++) {
    index = j*numFishPerGroup + i;
    fishX[index] = fishX[index-1] - fishWidth;
  }
  xStart -= (numFishPerGroup*fishWidth+fishSpacing);  
}

xStart = xMax - turtleSpacing;
for (j=0; j<numTurtleGroups; j++) {
  turtleX[j*numTurtlesPerGroup] = xStart;
  for (i=1; i<numTurtlesPerGroup; i++) {
    index = j*numTurtlesPerGroup + i;
    turtleX[index]=turtleX[index-1] - turtleWidth;
  }
  xStart -= (numTurtlesPerGroup*turtleWidth+turtleSpacing);
}

]]></Code>
</Content>
</Osejs.Model.Initialization.Page>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>Time</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
time = 0;
counter = 0;

gameOver = false;
replay = false;
score = 0;
optimalJumps = [];
boatInPlace = -1;
willDie = false;

frogimage = smfrogimage;
frogPos = [xMiddle,frogInitial];
frogVx = 0;
frogAngle=Math.PI/2;


]]></Code>
</Content>
</Osejs.Model.Initialization.Page>
</Osejs.Model.Initialization>
<Osejs.Model.Evolution>
<Osejs.Model.Evolution.Page>
<Type>EVOLUTION_EDITOR</Type>
<Name>Motion</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
if (!running) return;

//update the clock and counter
time += deltaTime;
counter++;

// This finishes the game after a number of seconds
/*
if (time>maxTime) {
  endOfGame(YOU_SURVIVED);
}
*/

// *** WRITE below this line your motion actions

moveObjects (raceCarX,   raceCarVx,   raceCarWidth,   raceCarSpacing);
moveObjects (yellowCarX, yellowCarVx, yellowCarWidth, yellowCarSpacing);
moveObjects (redCarX,    redCarVx,    redCarWidth,    redCarSpacing);
moveObjects (truckX,     truckVx,     truckWidth,     truckSpacing);
moveObjects (bikeX,      bikeVx,      bikeWidth,      bikeSpacing);

moveObjects (mapleLogX,  mapleLogVx,  mapleLogWidth,  mapleLogSpacing);
moveObjects (oakLogX,    oakLogVx,    oakLogWidth,    oakLogSpacing);
moveObjects (boatX,      boatVx,      boatWidth,      boatSpacing);

switchFishImage();
moveObjectsInGroups (numFishGroups,   numFishPerGroup,   fishX,  fishVx,  fishWidth,  fishSpacing);
moveObjectsInGroups (numTurtleGroups, numTurtlesPerGroup,turtleX,turtleVx,turtleWidth,turtleSpacing);

// Now, move the frog
if (frogVx!==0) { // Frog is moving
  frogLastPos = [frogPos[0],frogPos[1]];
  frogPos[0] += frogVx*deltaTime;
  // score is moved in this game
  score += (Math.abs(frogPos[0]-frogLastPos[0]) + Math.abs(frogPos[1]-frogLastPos[1]));
}

// *** WRITE above this line your motion actions

// Check for automatic decissions
autoplayAction(); // See "Autoplay" Custom page 


]]></Code>
</Content>
</Osejs.Model.Evolution.Page>
<Osejs.Model.Evolution.Page>
<Type>EVOLUTION_EDITOR</Type>
<Name>PostMotion</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[Collisions with objects]]></Comment>
<Code><![CDATA[
if(!running) return;

// *** WRITE below this line any post-motion actions or checks

// Check world limits
var side = frogWidth/2;
if      (frogPos[0]+side>xMax) { frogPos[0] = xMax; return endOfGame(DEAD_ON_ROAD); }
else if (frogPos[0]-side<xMin) { frogPos[0] = xMin; return endOfGame(DEAD_ON_ROAD); }
else if (frogPos[1]+side>yMax) { frogPos[1] = yMax; return endOfGame(DEAD_ON_ROAD); }
else if (frogPos[1]-side<yMin) { frogPos[1] = yMin; return endOfGame(DEAD_ON_ROAD); }


if (isFrogCrossingRoad()) { // Check road objects
  if (!isRoadLocationSafe(frogPos)) return endOfGame(DEAD_ON_ROAD);
}
else if (isFrogCrossingWater()) { // Check water objects
  if (checkFrogWaterLocation()) return; // Save on a water object
  var lillyReached = isOnTopOfWhichObject(frogPos,padX,padY,padWidth);
  if (lillyReached>=0) { // lillypads
    willDie = false;
    if (lillyReached==padPreferred) return endOfGame(SAFE_ON_PREFERRED_LILLY); 
    return endOfGame(SAFE_ON_LILLY); // lillypads
  }
  else return endOfGame(DEAD_ON_WATER);
}



]]></Code>
</Content>
</Osejs.Model.Evolution.Page>
</Osejs.Model.Evolution>
<Osejs.Model.Constraints>
<Osejs.Model.Constraints.Page>
<Type>CODE_EDITOR</Type>
<Name>Scores</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
scoreText = "Time:"+time.toFixed(0)+"s, Distance:"+score.toFixed(0)+"m" ;
recordText = "Time:"+((bestTime==Number.POSITIVE_INFINITY)? "?" : bestTime.toFixed(0)+"s")+
               ", Distance:"+((bestScore==Number.POSITIVE_INFINITY)? "?" : bestScore.toFixed(0)+"m");
               

]]></Code>
</Content>
</Osejs.Model.Constraints.Page>
</Osejs.Model.Constraints>
<Osejs.Model.Library>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Gameplay</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
// Edit this page to decide what to do on response to user interaction

/**
 * motion of sprite
 * @param direction of motion
 * @return nothing, really
 */
function moveSpriteTo (direction) {
  frogLastPos = [frogPos[0],frogPos[1]];
  switch(direction) {
    case NO_MOVE  : 
      // Do nothing
      break;
    case LEFT_MOVE  : 
      frogAngle = Math.PI;
      frogPos[0] -= frogJumpSize;
      break;
    case RIGHT_MOVE  : 
      frogAngle = 0;
      frogPos[0] += frogJumpSize;
      break;
    case DOWN_MOVE  :
      frogAngle = -Math.PI/2;
      frogPos[1] -= frogJumpSize;
      break;
    case UP_MOVE  : 
      frogAngle = Math.PI/2;
      frogPos[1] += frogJumpSize;
      break;
  }
  // Score is distance in this game
  score += (Math.abs(frogPos[0]-frogLastPos[0]) + Math.abs(frogPos[1]-frogLastPos[1]));
  frogVx = 0;
  if (isFrogCrossingWater()) checkFrogWaterLocation(); // Check if it is on top of a water object and sets it velocity
}

// fire action: Implement what happens if the user wants to fire!
function fireAction() { // Nothing in this game
}

/**
 * What to do when the user clicks in a panel
 * @param point double[2] the point of the click
 */
function clickAtPoint (point) {
//    console.log ("You clicked at "+point);
//    console.log ("Frog is at x = "+frogPos[0]+ ", y = "+frogPos[1]);  
  if (Math.abs(point[1]-actionsY)<frogHeight/4) { // actions row
    if (Math.abs(point[0]-resetX) < xRange/8) _reset(); 
    else if (Math.abs(point[0]-replayX) < xRange/8) replayGame();
    else if (Math.abs(point[0]-autoplayX) < xRange/4) changeAutoplay();
    return;
  }
  if (running) { // Implement here what happens if you click at a point when the game is running

    if (Math.abs(point[1]-frogPos[1])<0.75*frogHeight) { // same horizontal
      if (point[0]>frogPos[0]+tol) moveSpriteTo(RIGHT_MOVE);
      else if (point[0]<frogPos[0]-tol) moveSpriteTo(LEFT_MOVE);
    }
    // if (Math.abs(point[0]-frogPos[0])<frogHeight/2) 
    else { // any relevant vertical change
      if (point[1]>frogPos[1]+tol) moveSpriteTo(UP_MOVE);
      else if (point[1]<frogPos[1]-tol) moveSpriteTo(DOWN_MOVE);
    }
  }
  else { // Game is stopped
    if (gameOver) {
      _initialize();
      running = true;
    }
    else { // Implement here what happens if you click at a point when the game is not running
      // console.log ("The game is stopped and you clicked at x = "+point[0]+ ", y = "+point[1]);
      running = true;
    }
  }
}

// What is needed to replay the game (with the same random values)
function replayGame() {
  replay = true;
  running = false;
  _initialize();
}

// What happens when you click at the main message
function clickAtMessage () {
  if (!running) { // Game is stopped
    if (gameOver) _reset();
    else running = true;
  }
}

// The game ended
// @param status one of:
//  DEAD_ON_ROAD : you lost on the road
//  DEAD_ON_WATER : you lost on the water
//  SAFE_ON_LILLY : you won
function endOfGame (status) {
  switch(status) {
    case DEAD_ON_ROAD  : gameResultMessage = gameLostMessage; frogimage = deadImage;  break;
    case DEAD_ON_WATER : gameResultMessage = gameLostMessage; frogimage = drownImage; break;
    case SAFE_ON_PREFERRED_LILLY : 
      if (bestScore==Number.POSITIVE_INFINITY || bestScore<=score) gameResultMessage = gameWonMessage;
      else if (bestTime==Number.POSITIVE_INFINITY || bestTime<=time) gameResultMessage = gameWonMessage;
      else gameResultMessage = gameRecordMessage;
      bestScore = Math.min(score,bestScore);
      bestTime = Math.min(time,bestTime);
      break;
    case SAFE_ON_LILLY : 
      gameResultMessage = gameTiedMessage;
      break;
  }
  message = playAgainMessage;
  running = false;
  gameOver = true;
}

]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Objects</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
/**
 * whether the frog is crossing the road
 * @return true or false
 */
function isFrogCrossingRoad() {
  return frogPos[1]>roadBottom && frogPos[1]<(roadBottom+roadHeight);
}

/**
 * whether the frog is crossing the water
 * @return true or false
 */
function isFrogCrossingWater() {
  return frogPos[1]>waterBottom; // && frogPos[1]<(waterBottom+waterHeight);
}

/**
 * whether a point is out of the game limits
 * @param point the double[2] point to be checked
 * @return true or false
 */
function isOutOfBounds(location) {
  var side = frogWidth/2;
  if      (location[0]+side>=xMax) return true;
  else if (location[0]-side<=xMin) return true;
  else if (location[1]+side>=yMax) return true;
  else if (location[1]-side<=yMin) return true;
  return false;
}

/**
 * Wether the frog at the given point collides with one of these objects
 * for private use, mainly
 */
function conflictsWithObjects (point,objectX, objectY, objectWidth) {
  if (Math.abs(point[1]-objectY)>tol) return false;
  var margin = objectWidth/2;
  var xCenter = point[0], xLeft = xCenter - frogWidth/2, xRight = xCenter + frogWidth/2;
  for (var i=0, n=objectX.length; i<n; i++) {
    if (xCenter<objectX[i]) {
      if (xRight>(objectX[i]-margin)) return true;
    }
    else {
      if (xLeft <(objectX[i]+margin)) return true;
    }
  }
  return false;
}

/**
 * Whether the given location on the road is safe for the frog
 * @param point the point to check for
 * @return true is safe, false if the frog would die there
 */
function isRoadLocationSafe (location) { 
  if (isOutOfBounds(location)) return false;
  // Order is not relevant
  if (conflictsWithObjects(location,raceCarX,  raceCarY,  raceCarWidth))   return false; 
  if (conflictsWithObjects(location,yellowCarX,yellowCarY,yellowCarWidth)) return false; 
  if (conflictsWithObjects(location,redCarX,   redCarY,   redCarWidth))    return false;
  if (conflictsWithObjects(location,truckX,    truckY,    truckWidth))     return false;
  if (conflictsWithObjects(location,bikeX,     bikeY,     bikeWidth))      return false;
  return true;
}

/**
 * Whether the frog is on top of one of these objects
 * for private use, mainly
 * @return -1 if false, the index of the object it sits on, if true
 */
function isOnTopOfWhichObject (location, objectX, objectY, objectWidth) {
  var margin = objectWidth/2;
  if (Math.abs(location[1]-objectY)>tol) return -1;
  for (var i=0, n=objectX.length; i<n; i++) {
    if (Math.abs(location[0]-objectX[i])<margin) return i;
  }
  return -1;
}

/**
 * Whether the frog is on top of one of these objects
 * for private use, mainly
 */
function isOnTopOfObjects (location, objectX, objectY, objectWidth) {
  return isOnTopOfWhichObject(location, objectX, objectY, objectWidth)>=0;
}

/**
 * Whether the frog is on top of one of the objects in a group
 * for private use, mainly
 * @return the index is true, -1 if false
 */
function isOnTopOfGroup (location, nGroups, nObjPerGroup, objectX, objectY, objectVx, objectWidth) {
  var margin = objectWidth/2;
  if (Math.abs(location[1]-objectY)>tol) return false;
  for (var j=0; j<nGroups; j++) {
    var firstIndex = j*nObjPerGroup;
    var lastIndex  = firstIndex+nObjPerGroup-1;
    var limit;
    if (objectVx>0) limit = (objectX[firstIndex]<objectX[lastIndex]) ? xMax : objectX[firstIndex];
    else            limit = (objectX[firstIndex]>objectX[lastIndex]) ? xMin : objectX[firstIndex];
    if (location[0]<limit+margin && location[0]>objectX[lastIndex]-margin) return true; // inside of group
  }
  return false;
}

/**
 * Whether the frog is on top of an object and, if so, give it the speed of that object
 * @return true if the frog is on top of an object
 */
 function checkFrogWaterLocation() {
  if (isOutOfBounds(frogPos)) return false;
  if (isOnTopOfObjects(frogPos,mapleLogX,mapleLogY,mapleLogWidth)) { frogVx = mapleLogVx; return true; }
  if (isOnTopOfObjects(frogPos,oakLogX,  oakLogY,  oakLogWidth))   { frogVx = oakLogVx;   return true; }
  if (isOnTopOfObjects(frogPos,boatX,    boatY,    boatWidth))     { frogVx = boatVx;     return true; }
  if (isOnTopOfGroup(frogPos,numTurtleGroups,numTurtlesPerGroup,turtleX,turtleY,turtleVx,turtleWidth))  { frogVx = turtleVx;  return true; }
  if (isOnTopOfGroup(frogPos,numFishGroups,  numFishPerGroup,   fishX,  fishY,  fishVx,  fishWidth))    { frogVx = fishVx;    return true; }
  return false;
}

function getYellowLilyX() {
  return padX[padPreferred];
}

]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Animations</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
/**
 * Whether an object leaves the playground
 * for private use, mainly
 * @returns a factor:
 *    0 : no
 *   +1 : yes, on the right
 *   -1 : yes, to the left
 */
function moves(oX,oVx,margin) {
  if (oVx>0) { // Moving right
    if (oX-margin>xMax) return +1;
  }
  else { // Moving left
    if (oX+margin<xMin) return -1;
  }
  return 0;
}
  
function moveObjects (objectX, objectVx, objectWidth, objectSpacing) {
  var margin = objectWidth/2;
  for (var i=0, nObjects = objectX.length; i<nObjects; i++) {
    objectX[i] +=  objectVx*deltaTime;
    var move = moves(objectX[i],objectVx,margin);
    if (move) {
      var previousIndex = (i>0) ? i-1 : nObjects-1;
      objectX[i] = objectX[previousIndex] - move*getRandomDouble(2,4)*objectSpacing;
      // Do not appear out of the blue
      objectX[i] = (move>0) ? Math.min(xMin-margin,objectX[i]) : Math.max(xMax+margin,objectX[i]);
    } // end of if move
  } // end of for i
}

function moveObjectsInGroups (nGroups, nObjPerGroup, objectX, objectVx, objectWidth, objectSpacing) {
  var nObjects = nGroups*nObjPerGroup;
  var margin = objectWidth/2;
  for (var j=0; j<nGroups; j++) {
    for (var i=0; i<nObjPerGroup; i++) {
      var index = j*nObjPerGroup+i;
      objectX[index] += objectVx*deltaTime;
      var move = moves(objectX[index],objectVx,margin);
      if (move) {
        if (i===0) {
          if (j===0) objectX[index] = objectX[nObjects-1] - move*objectSpacing; // first object; move behind last object in last group
          else       objectX[index] = objectX[index-1]    - move*objectSpacing; // first object in group; move behind previous group
        }
        else objectX[index] = objectX[index-1] - move*objectWidth;  // all other objects follow the previous one
        // Do not appear out of the blue
        objectX[index] = (move>0) ? Math.min(xMin-margin,objectX[index]) : Math.max(xMax+margin,objectX[index]);
      } // End of if move
    } // end of for i
  } // end of for j
}


/**
 * change the fish image to make it swim
 */
function switchFishImage() {
  if (counter % 10 ===0) {
    if (fishImage==fishImageSwim1) fishImage = fishImageSwim2;
    else fishImage = fishImageSwim1;
  }
}

/* not used
//change the frog image when it moves
function switchFrogImage() {
  if (frogimage==smfrogimage) frogimage = medfrogimage;
  else frogimage = smfrogimage;
}
*/
]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Simple autoplay</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
/**
 * Utility to obtain what would be the location of the frog
 * if it did a number of jumps.
 * @param jumps array on integers. Each integer represents a jump,
 * and can be one of NO_MOVE, LEFT_MOVE, RIGHT_MOVE, DOWN_MOVE, UP_MOVE.
 * @return a double[2] array with the eventual [x,y] coordinates of 
 * the frog after the jumps
 */
function getLocationFromFrog (jumps) {
  var x = frogPos[0], y= frogPos[1];
  for (var i=0, n= jumps.length; i<n; i++) {
    var direction = jumps[i];
    switch(direction) {
      case NO_MOVE  : // Do nothing
        break;
      case LEFT_MOVE  : 
        x -= frogJumpSize;
        break;
      case RIGHT_MOVE  : 
        x += frogJumpSize;
        break;
      case DOWN_MOVE  :
        y -= frogJumpSize;
        break;
      case UP_MOVE  : 
        y += frogJumpSize;
        break;
    } // end of switch
  } // end of for
  return [x,y];
}


/**
 * Whether the frog is one jump up from the road
 * @return true or false
 */
function isFrogReadyToCrossRoad() {
  return frogPos[1]>=(roadBottom-frogJumpSize-tol) && frogPos[1]<roadBottom;
}

/**
 * Whether the frog is one jump up from the water
 * @return true or false
 */
function isFrogReadyToCrossWater() {
  return frogPos[1]>=(waterBottom-frogJumpSize-tol) && frogPos[1]<waterBottom;
}

/**
 * The velocity of objects on the same row as the point
 * @param point the double[2] with the coordinates of the point to check (only point[1] matters)
 * @return the velocity. 0 if the point is not in a row with moving objects
 */
function velocityOfObjects(location) {
  if (Math.abs(location[1]-raceCarY)  <tol) return raceCarVx;
  if (Math.abs(location[1]-yellowCarY)<tol) return yellowCarVx;
  if (Math.abs(location[1]-redCarY)   <tol) return redCarVx;
  if (Math.abs(location[1]-truckY)    <tol) return truckVx;
  if (Math.abs(location[1]-bikeY)     <tol) return bikeVx;

  if (Math.abs(location[1]-mapleLogY) <tol) return mapleLogVx;
  if (Math.abs(location[1]-oakLogY)   <tol) return oakLogVx;
  if (Math.abs(location[1]-boatY)     <tol) return boatVx;
  if (Math.abs(location[1]-fishY)     <tol) return fishVx;
  if (Math.abs(location[1]-turtleY)   <tol) return turtleVx;
  return 0;
}

/**
 * The direction of motion of objects in the row of the point
 * @param point the double[2] with the coordinates of the point to check (only point[1] matters)
 * @return the direction, as an integer. One of RIGHT_MOVE, LEFT_MOVE, NO_MOVE
 */
function directionOfMotion(location) {
  var velocity = velocityOfObjects(location);
  if (velocity>0) return RIGHT_MOVE;
  else if (velocity<0) return LEFT_MOVE;
  return NO_MOVE;
}

/**
 * Whether the given location on the water is safe for the frog
 * @param point the point to check for
 * @return true is safe, false if the frog would die there
 */
function isWaterLocationSafe (location) { 
  // Order is not relevant
  if (isOnTopOfObjects (location,mapleLogX,mapleLogY,mapleLogWidth)) return true;
  if (isOnTopOfObjects (location,oakLogX,  oakLogY,  oakLogWidth))   return true;
  if (isOnTopOfObjects (location,boatX,    boatY,    boatWidth))     return true;
  if (isOnTopOfObjects (location,padX,     padY,     padWidth))      return true;
  if (isOnTopOfGroup (location,numTurtleGroups,numTurtlesPerGroup, turtleX,turtleY,turtleVx,turtleWidth)) return true;
  if (isOnTopOfGroup (location,numFishGroups  ,numFishPerGroup,    fishX,  fishY,  fishVx,  fishWidth))   return true;
  return false;
} 

/**
 * A simple strategy to cross the field
 * @return nothing, really
 */
function autoplaySimple() {
  // get current location and that of the desired move
  var currentLocation = getLocationFromFrog([NO_MOVE]);
  var pointUp = getLocationFromFrog ([UP_MOVE]);
  // in the next line, || is the logical 'or' operator
  if (isFrogCrossingRoad() || isFrogReadyToCrossRoad()) {
    // we are on the road phase
    if (isRoadLocationSafe(pointUp)) { 
    // it is safe to move up
      if (directionOfMotion(pointUp)==LEFT_MOVE) { 
        // next row objects move left
        if (isRoadLocationSafe(getLocationFromFrog([UP_MOVE,RIGHT_MOVE]))) 
          // both the locations UP and UP+RIGHT from the frog are safe!
          return moveSpriteTo(UP_MOVE);
      }
      else { 
        // next row objects move right
        if (isRoadLocationSafe(getLocationFromFrog([UP_MOVE,LEFT_MOVE]))) 
        // both the locations UP and UP+LEFT from the frog are safe!
          return moveSpriteTo(UP_MOVE);
      }
    }
    // cannot move up
    if (isFrogCrossingRoad()) {
      // already on the road, look for danger!
      if (directionOfMotion(currentLocation)==LEFT_MOVE) { 
        // objects come from the right
        if (!isRoadLocationSafe(getLocationFromFrog([RIGHT_MOVE]))) { 
          // Danger: object approaching!
          if (isRoadLocationSafe(getLocationFromFrog([LEFT_MOVE]))) 
            return moveSpriteTo(LEFT_MOVE); // escape by jumping left
          if (isRoadLocationSafe(getLocationFromFrog([DOWN_MOVE]))) 
            return moveSpriteTo(DOWN_MOVE); // escape by jumping down
        }
      }
      else { 
        // objects come from the left
        if (!isRoadLocationSafe(getLocationFromFrog([LEFT_MOVE]))) { 
          // Danger: object approaching!
          if (isRoadLocationSafe(getLocationFromFrog([RIGHT_MOVE]))) 
            return moveSpriteTo(RIGHT_MOVE); // escape by jumping left
          if (isRoadLocationSafe(getLocationFromFrog([DOWN_MOVE ]))) 
            return moveSpriteTo(DOWN_MOVE ); // escape by jumping down
        }
      }
    } // end of isOnTheRoad
    else { // Not crossing it, but ready to cross the road
      // approach the center of the field, it will give you more chances
      if (currentLocation[0]<xMiddle) return moveSpriteTo(RIGHT_MOVE);
      if (currentLocation[0]>xMiddle) return moveSpriteTo(LEFT_MOVE);
    }
  } // end of road phase
  else if (isFrogCrossingWater() || isFrogReadyToCrossWater()) { 
    // we are on the water phase
    if (isWaterLocationSafe(pointUp)) return moveSpriteTo(UP_MOVE);
    // Cannot move up
    if (isFrogCrossingWater()) { 
      // already on the water, look for danger!
      if (directionOfMotion(currentLocation)==LEFT_MOVE) { 
        // water objects move to the left
        if (isOutOfBounds(getLocationFromFrog([LEFT_MOVE]))) { 
          // Danger! reaching the border
          if (isWaterLocationSafe(getLocationFromFrog([RIGHT_MOVE]))) 
            return moveSpriteTo(RIGHT_MOVE); // escape by jumping right
          if (isWaterLocationSafe(getLocationFromFrog([DOWN_MOVE ]))) 
            return moveSpriteTo(DOWN_MOVE ); // escape by jumping down
        }
      }
      else { 
        // water objects move to the right
        if (isOutOfBounds(getLocationFromFrog ([RIGHT_MOVE]))) {  
          // Danger! reaching the border
          if (isWaterLocationSafe(getLocationFromFrog([LEFT_MOVE]))) 
            return moveSpriteTo(LEFT_MOVE);  // escape by jumping left
          if (isWaterLocationSafe(getLocationFromFrog([DOWN_MOVE]))) 
            return moveSpriteTo(DOWN_MOVE ); // escape by jumping down
        }
      }
    } // end of isOnTheWater
  } // end of water phase

  else moveSpriteTo(UP_MOVE); // Approach next obstacle
  // Otherwise...
  // Stay where you are and hope that in deltaTime seconds you can move
}

]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Optimal autoplay</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
// Tries to predict the location of the objects in timeSteps units of time from now.
// We say that it "TRIES" because the random nature of border appearances makes it impossible 
// to be 100% sure of objects that go beyond borders!
// returns a new array with the X coordinates of the objects
function predictObjects (timeSteps, objectX, objectVx, objectWidth, objectSpacing) {
  var margin = objectWidth/2;
  var xCoordinates = [];
  var nObjects = objectX.length;
  for (var j=0; j<nObjects; j++) xCoordinates[j] = objectX[j];
  while (timeSteps>0) {
    for (var i=0; i<nObjects; i++) {
      xCoordinates[i] +=  objectVx*deltaTime;
      var move = moves(xCoordinates[i],objectVx,margin);
      if (move) {
        var previousIndex = (i>0) ? i-1 : nObjects-1;
        xCoordinates[i] = xCoordinates[previousIndex] - move*getRandomDouble(2,4)*objectSpacing;
        // Do not appear out of the blue
        xCoordinates[i] = (move>0) ? Math.min(xMin-margin,objectX[i]) : Math.max(xMax+margin,xCoordinates[i]);
      } // end of if move
    } // end of for i
    timeSteps--;
  } // end of while timeSteps>0
  return xCoordinates;
}

// Tries to predict the location of the objects in timeSteps units of time from now.
// We say that it "TRIES" because the random nature of border appearances makes it impossible 
// to be 100% sure of objects that go beyond borders!
// returns a new array with the X coordinates of the objects
function predictObjectsInGroups (timeSteps, nGroups, nObjPerGroup, objectX, objectVx, objectWidth, objectSpacing) {
  var nObjects = nGroups*nObjPerGroup;
  var margin = objectWidth/2;
  var xCoordinates = [];
  for (var k=0; k<nObjects; k++) xCoordinates[k] = objectX[k];
  while (timeSteps>0) {
    for (var j=0; j<nGroups; j++) {
      for (var i=0; i<nObjPerGroup; i++) {
        var index = j*nObjPerGroup+i;
        xCoordinates[index] += objectVx*deltaTime;
        var move = moves(xCoordinates[index],objectVx,margin);
        if (move) {
          if (i===0) {
            if (j===0) xCoordinates[index] = xCoordinates[nObjects-1] - move*objectSpacing; // first object; move behind last object in last group
            else       xCoordinates[index] = xCoordinates[index-1]    - move*objectSpacing; // first object in group; move behind previous group
          }
          else xCoordinates[index] = xCoordinates[index-1] - move*objectWidth;  // all other objects follow the previous one
          // Do not appear out of the blue
          xCoordinates[index] = (move>0) ? Math.min(xMin-margin,xCoordinates[index]) : Math.max(xMax+margin,xCoordinates[index]);
        } // End of if move
      } // end of for i
    } // end of for j
    timeSteps--;
  }
  return xCoordinates;
}
 
function willCollideWithObjects(point,timeSteps,objectX, objectY, objectVx, objectWidth, objectSpacing) {
  if (Math.abs(point[1]-objectY)>tol) return false; // Not in this row
  // Predict where objects will be in this row
  var prediction = predictObjects (timeSteps, objectX, objectVx, objectWidth, objectSpacing);
  return conflictsWithObjects(point, prediction,  objectY,  objectWidth); 
}

function willBeOnTopOfObjects(point,timeSteps,objectX, objectY, objectVx, objectWidth, objectSpacing) {
  if (Math.abs(point[1]-objectY)>tol) return false; // Not in this row
  // Predict where objects will be in this row
  var prediction = predictObjects (timeSteps,objectX,objectVx,objectWidth,objectSpacing);
  return isOnTopOfObjects(point, prediction,  objectY,  objectWidth);
}

function willBeOnTopOfGroup(point,timeSteps,nGroups, nObjPerGroup, objectX, objectY, objectVx, objectWidth, objectSpacing) {
  if (Math.abs(point[1]-objectY)>tol) return false; // Not in this row
  // Predict where objects will be in this row
  var prediction = predictObjectsInGroups (timeSteps,nGroups,nObjPerGroup,objectX,objectVx,objectWidth,objectSpacing);
  return isOnTopOfGroup(point, nGroups, nObjPerGroup, prediction,  objectY,  objectVx, objectWidth);
}

function isOnLilyPad(location) {
  return (isOnTopOfWhichObject(location,padX,padY,padWidth)>=0);
}

function isFrogOnBoat() {
  return (isOnTopOfWhichObject(frogPos,boatX,boatY,boatWidth)>=0);
}

/**
 * An strategy to cross the field minimizing the distance
 * @param nicest a boolean indicating if the frog is allowed
 * to move horizontally or wait in place while crossing the road
 * @return nothing, really
 */
function autoplayOptimal(nicest) {
  if (isFrogOnBoat()) {
    var pointUp = getLocationFromFrog ([UP_MOVE]);    
    if (isOnLilyPad(pointUp)) return moveSpriteTo(UP_MOVE); // Win!
    return; // else, wait a little bit
  }
  if (optimalJumps && optimalJumps.length>0) { 
    // the frog already knows what to do: jump!
    // extract next move and remove it from the array
    var nextMove = optimalJumps.shift();
    return moveSpriteTo(nextMove);
  }
  var currentLocation = getLocationFromFrog([NO_MOVE]);  
  if (currentLocation[1]<roadBottom) { 
    // Find how to cross the road
    if (nicest) optimalJumps = findNicestRoadSolution();
    else optimalJumps = findOptimalRoadSolution();
  }
  else if (currentLocation[1]<waterBottom) {
    // if on the sand, move towards the yellow lily
    var motionAllowed = towardsYellowLilyVertical(currentLocation);
    if (motionAllowed!=NO_MOVE) return moveSpriteTo(motionAllowed);
    // else, try to find the optimal water path
    optimalJumps = findOptimalWaterSolution();
  }
}

// --------------------------------------------------

function towardsYellowLilyVertical(location) {
  var margin = padWidth/2;
  var limit = getYellowLilyX()-boatVx*deltaTime+margin;
  if (location[0]<limit) return RIGHT_MOVE;
  if (location[0]-frogJumpSize>limit) return LEFT_MOVE;
  return NO_MOVE;
}


// Status of a location in the road after some jumps
// returs: 
//  0 still alive and crossing the road
//  1 safely crossed the road
// -1 dead on road
function statusOfRoadLocation (jumps) {
  var point = getLocationFromFrog (jumps);
  willKillYou = [point[0],point[1]];
  if (isOutOfBounds(point)) return -1;
  if (point[1]>=(roadBottom+roadHeight)) return 1; // Will reach target!
  var timeSteps = jumps.length;
  // Order is not relevant
  if (willCollideWithObjects(point, timeSteps, raceCarX,   raceCarY,   raceCarVx,   raceCarWidth,   raceCarSpacing))   return -1;
  if (willCollideWithObjects(point, timeSteps, yellowCarX, yellowCarY, yellowCarVx, yellowCarWidth, yellowCarSpacing)) return -1;
  if (willCollideWithObjects(point, timeSteps, redCarX,    redCarY,    redCarVx,    redCarWidth,    redCarSpacing))    return -1;
  if (willCollideWithObjects(point, timeSteps, truckX,     truckY,     truckVx,     truckWidth,     truckSpacing))     return -1;
  if (willCollideWithObjects(point, timeSteps, bikeX,      bikeY,      bikeVx,      bikeWidth,      bikeSpacing))      return -1;
  return 0;
}

/**
 * Return the optimal sequence of jumps for crossing the road
 * Actually returns a sequence of six UP_MOVE jumps
 * or null, if any of these jumps is dangerous
 */
function findOptimalRoadSolution() {
  willDie = false;
  var jumps = []; 
  // we need 6 jumps up to cross the road
  // but the last one is always safe
  for (var row=0; row<5; row++) { 
    jumps.push(UP_MOVE);
    if (statusOfRoadLocation(jumps)<0) { // This is a bad path
      willDie = true;
      return null; 
    }
  }
  jumps.push(UP_MOVE); // Add the final jump
  // Survived: i.e. will cross the road
  return jumps; // will start motion
}

function findNicestRoadSolution() {
  var jumpList = [];
  // First jump
  switch(statusOfRoadLocation([UP_MOVE])) {
    case -1 : return null; // Initial jump up is NOT safe:
    case 0  : jumpList.push([UP_MOVE]); break; // a good start
    default : return null; // actually, not possible
  }
  // Now explore repeatedly all possibilities
  var tries=0;
  while (tries<20) { // Avoid infinite loop or too long waits
    var newJumpList = [];
    for (var i=0, n=jumpList.length; i<n; i++) {
      var jumps = jumpList[i];
      var newJumps = jumps.concat([UP_MOVE]);
      switch(statusOfRoadLocation(newJumps)) {
        case 1 : return newJumps; // will cross road safely
        case 0 : newJumpList.push(newJumps); break; // Still possible
        default: break; // do nothing. This is a bad path
      }
      newJumps = jumps.concat([NO_MOVE]);
      switch(statusOfRoadLocation(newJumps)) {
        case 1 : break; // actually impossible
        case 0 : newJumpList.push(newJumps); break; // Still possible
        default: break; // do nothing. This is a bad path
      }
      var location = getLocationFromFrog(jumps);
      var motionAllowed = towardsYellowLilyVertical(location);
      if (motionAllowed!=NO_MOVE) {
        newJumps = jumps.concat([motionAllowed]);
        switch(statusOfRoadLocation (newJumps)) {
          case 1 : break; // actually impossible
          case 0 : newJumpList.push(newJumps); break; // Still possible
          default: break; // do nothing. This is a bad path
        }
      }
    }
    if (newJumpList.length<=0) return null;
    // Copy the list of possible jumps and repeat
    jumpList = [];
    for (var j=0, m=newJumpList.length; j<m; j++) 
      jumpList[j] = newJumpList[j];
    tries++;
  }
  return null;
}
// --------------------------------------------------


// Status of a location in the water after some jumps
// returs a code and updates the correction array 
//  0 valid jumps
// -1 would die
function statusOfWaterLocation (jumps,correction) {
  var point = getLocationFromFrog (jumps);
  point[0] += correction[0];
  willKillYou = [point[0],point[1]];
  willDie = false;
  if (isOutOfBounds(point)) return -1;
  var timeSteps = jumps.length;
  if (willBeOnTopOfObjects(point,timeSteps,mapleLogX, mapleLogY, mapleLogVx, mapleLogWidth, mapleLogSpacing)) {
    correction[0] += mapleLogVx*deltaTime;
    return 0;
  }
  if (willBeOnTopOfObjects(point,timeSteps,oakLogX,   oakLogY,   oakLogVx,   oakLogWidth,   oakLogSpacing))   {
    correction[0] += oakLogVx*deltaTime;
    return 0;
  }
  if (willBeOnTopOfObjects(point,timeSteps,boatX,     boatY,     boatVx,     boatWidth,     boatSpacing))     {
    correction[0] += boatVx*deltaTime;
    return 0;
  }
  if (willBeOnTopOfGroup(point,timeSteps,numTurtleGroups,numTurtlesPerGroup,turtleX, turtleY, turtleVx, turtleWidth, turtleSpacing)) {
    correction[0] += turtleVx*deltaTime;
    return 0;
  }
  if (willBeOnTopOfGroup(point,timeSteps,numFishGroups,numFishPerGroup,fishX, fishY, fishVx, fishWidth, fishSpacing)) {
    correction[0] += fishVx*deltaTime;
    return 0;
  }
  return -1;
}

/**
 * Whether there is a boat in place for reaching
 * the yellow lily
 */
function isBoatInPlace() {
  var margin = padWidth/2;
  var deltaX = boatVx*deltaTime; // Distance travelled by a boat in 4 time steps
  var hotSpot = padX[padPreferred]-boatVx*deltaTime+margin; // +boatWidth/2;
  for (var i=0, n=boatX.length; i<n; i++) {
    var boatWillBe = boatX[i]-4*deltaX;
    if ((boatWillBe < hotSpot+boatWidth/2) && (boatWillBe > hotSpot-boatWidth/2)) {
      boatInPlace = i;
      return true;
    }
  }
  boatInPlace = -1;
  return false;
}

/**
 * Return the optimal sequence of jumps for crossing the water
 * Actually returns a sequence of six UP_MOVE jumps
 * or null, if any of these jumps is dangerous
 */
function findOptimalWaterSolution() {
  // Find if there is a top boat in the right location
  if (!isBoatInPlace()) {
    willDie = false;
    boatInPlace = -1;
    return null;
  }
  var correction = [0]; // initial location correction due to motion
  var jumps = []; 
  for (var row=0; row<5; row++) { // 5 jumps to reach a boat
    jumps.push(UP_MOVE);
    if (statusOfWaterLocation (jumps,correction)<0) { // This is a bad path
      willDie = true;
      return null; 
    }
  }
  // Survived: i.e. will reach the boat
  return jumps; // will start motion
}


]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Autoplay</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
// EDIT this function to implement an autoplay strategy

function changeAutoplay() {
  if (userAutoplayShowDialog) return userAutoplayEval();
  boatInPlace = -1;
  willDie = false;
  userAutoplayShowDialog = false;
  _play();
  autoplayOption = (autoplayOption+1) % 5;
  if (!FULL_AUTOPLAY) {
    if (autoplayOption==2) autoplayOption = 4; // Skip advanced
    if (autoplayOption==3) autoplayOption = 4; // Skip nicest  
  }
  switch (autoplayOption) {
    case 0 : autoplayText = "None"; break;
    case 1 : autoplayText = "Simple"; break;
    case 2 : autoplayText = "Advanced"; break;
    case 3 : autoplayText = "Nicest"; break;
    case 4 :
      autoplayText = "User"; 
      userAutoplayShowDialog = true;
      _pause();
      break;
  }
}

function autoplayAction() {
  switch (autoplayOption) {
    case 1 : autoplaySimple(); break;
    case 2 : autoplayOptimal(false); break;
    case 3 : autoplayOptimal(true); break;
    case 4 : userAutoplayFunction(); break;
    default: break; // do nothing
  }
}

// *** No need to edit this page beyond this point

function userAutoplayEval() {
  userAutoplayFunction = undefined;
  try {
//    userAutoplayFunction = new Function(userAutoplay);
    var userPlay = _view.autoplayTextArea.getValue();
    eval(userPlay);
  } catch (error) {
    userAutoplayFunction = undefined;
  }
  if (!userAutoplayFunction) {
    alert("No valid userAutoplay function provided!\nPlease, edit the userAutoplay function");
    autoplayOption = 0;
  }
  userAutoplayShowDialog = false;
  _play();
}


]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Keyboard</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
// *** No need to edit this page

// Must be called from an Initializationpage to make
// the game responsive to keyboard events
function initializeKeyboardEvents() {
  // keyboard press down event
  window.onkeydown = function(event) {
    var char = getKey(event || window.event);
    console.log ("You pressed char="+char);
    if (running) {
      switch(char) {
        case 37 : moveSpriteTo(LEFT_MOVE);  event.preventDefault(); event.stopPropagation(); break;
        case 38 : moveSpriteTo(UP_MOVE);    event.preventDefault(); event.stopPropagation(); break;
        case 39 : moveSpriteTo(RIGHT_MOVE); event.preventDefault(); event.stopPropagation(); break;
        case 40 : moveSpriteTo(DOWN_MOVE);  event.preventDefault(); event.stopPropagation(); break;
      }
    }
    return _isPaused;
  };
}

// get character; event.type must be keypress
// this is used for the keyboard control
function getCharKey(event) {
  if (event.which === null) {
    return event.keyCode; // IE
  } else if (event.which!==0 && event.charCode!==0) {
    return event.which;   // other browsers
  } else {
    return -1; // special key
  }
}

// get character; event.type must be keydown
// this is used for the keyboard control
// and allows for pressing down arrows
function getKey(event) {
  return event.keyCode; // IE
}

]]></Code>
</Content>
</Osejs.Model.Library.Page>
<Osejs.Model.Library.Page>
<Type>LIBRARY_EDITOR</Type>
<Name>Random</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
// *** No need to edit this page

// Returns a random integer between the given ones, both included
function getRandomInteger(min,max) {
  return randomGenerator.nextRange(min,max+1);
}

// Returns a random double between the given ones, both included
function getRandomDouble(min,max) {
  return min + randomGenerator.nextDouble()*(max-min);
}

// Random number generator
// Adapted from http://stackoverflow.com/questions/424292/seedable-javascript-random-number-generator
function RNG(seed) { 
  var self = {};
  // LCG using GCC's constants
  self.m = 0x80000000; // 2**31;
  self.a = 1103515245;
  self.c = 12345;
  self.firstState = (seed) ? seed : Math.floor(Math.random() * (self.m-1)); 

  self.state = self.firstState;
  
  self.nextInt = function() {
    self.state = (self.a * self.state + self.c) % self.m;
    return self.state;
  };
  
  self.nextDouble = function() { // returns in range [0,1]
    return self.nextInt() / (self.m - 1);
  };

  self.nextRange = function(start, end) {
  // returns in range [start, end): including start, excluding end
  // can't modulu nextInt because of weak randomness in lower bits
    var rangeSize = end - start;
    var randomUnder1 = self.nextInt() / self.m;
    return start + Math.floor(randomUnder1 * rangeSize);
  };

  self.setResetState = function() {
    self.firstState = self.state;
  };
  
  self.reset = function() {
    self.state = self.firstState;
  };
  
  return self;
}

]]></Code>
</Content>
</Osejs.Model.Library.Page>
</Osejs.Model.Library>
<Osejs.Model.Elements>
</Osejs.Model.Elements>
</Osejs.Model>
<Osejs.View>
<Osejs.View.Creation>
</Osejs.View.Creation>
</Osejs.View>
<Osejs.HtmlView>
<Osejs.HtmlView.Page>
<Type>HTML_VIEW_EDITOR</Type>
<Name>HtmlView</Name>
<Active>true</Active>
<Internal>false</Internal>
<Content>
<SizeOption>0</SizeOption>
<X>67</X>
<Y>38</Y>
<Width>600</Width>
<Height>800</Height>
<KeepHidden>true</KeepHidden>
<RootProperties>
</RootProperties>
<Tree>
<HtmlView.Element>
<Expanded>true</Expanded>
<Type>Elements.Panel</Type>
<Name><![CDATA[topPanel]]></Name>
<Property name="CSS"><![CDATA[{
  "position" : "absolute",
  "top" : "0px",
   "margin-left":"0px",
   "left":"0%"
}]]></Property>
<Property name="Height"><![CDATA["100%"]]></Property>
<Property name="Width"><![CDATA["100%"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>true</Expanded>
<Type>Elements.DrawingPanel</Type>
<Name><![CDATA[drawingPanel]]></Name>
<Parent><![CDATA[topPanel]]></Parent>
<Property name="ShowAreaRectangle"><![CDATA[false]]></Property>
<Property name="CSS"><![CDATA[{
  "position" : "absolute",
  "top" : "0px",
   "margin-left":"0px",
   "left":"0%"
}]]></Property>
<Property name="Background"><![CDATA["White"]]></Property>
<Property name="Enabled"><![CDATA[true]]></Property>
<Property name="SquareAspect"><![CDATA[true]]></Property>
<Property name="MaximumY"><![CDATA[yMax]]></Property>
<Property name="MaximumX"><![CDATA[xMax]]></Property>
<Property name="OnResize"><![CDATA[_view._touch();]]></Property>
<Property name="MinimumX"><![CDATA[xMin]]></Property>
<Property name="MinimumY"><![CDATA[yMin]]></Property>
<Property name="Foreground"><![CDATA["none"]]></Property>
<Property name="Height"><![CDATA["100%"]]></Property>
<Property name="OnPress"><![CDATA[%clickAtPoint%]]></Property>
<Property name="Width"><![CDATA["100%"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[fieldGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[road]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="FillColor"><![CDATA["Black"]]></Property>
<Property name="SizeX"><![CDATA[xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="LineColor"><![CDATA["Black"]]></Property>
<Property name="Y"><![CDATA[roadBottom]]></Property>
<Property name="SizeY"><![CDATA[roadHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[water]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="FillColor"><![CDATA["Blue"]]></Property>
<Property name="SizeX"><![CDATA[xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="LineColor"><![CDATA["Blue"]]></Property>
<Property name="Y"><![CDATA[waterBottom]]></Property>
<Property name="SizeY"><![CDATA[waterHeight]]></Property>
<Property name="DrawLines"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[grass]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="FillColor"><![CDATA["Green"]]></Property>
<Property name="SizeX"><![CDATA[xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="LineColor"><![CDATA["Green"]]></Property>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[pondY-rowHeight/2]]></Property>
<Property name="SizeY"><![CDATA[3*rowHeight]]></Property>
<Property name="DrawLines"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ShapeSet2D</Type>
<Name><![CDATA[ponds]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numPonds]]></Property>
<Property name="SizeX"><![CDATA[pondWidth]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="X"><![CDATA[pondX]]></Property>
<Property name="LineColor"><![CDATA["Blue"]]></Property>
<Property name="Y"><![CDATA[pondY]]></Property>
<Property name="SizeY"><![CDATA[pondHeight]]></Property>
<Property name="DrawLines"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[lillypads]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numPonds]]></Property>
<Property name="SizeX"><![CDATA[padWidth]]></Property>
<Property name="X"><![CDATA[pondX]]></Property>
<Property name="Y"><![CDATA[padY]]></Property>
<Property name="ImageUrl"><![CDATA[%padImage%]]></Property>
<Property name="SizeY"><![CDATA[padHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[sand]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="FillColor"><![CDATA["Orange"]]></Property>
<Property name="SizeX"><![CDATA[xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="LineColor"><![CDATA["Orange"]]></Property>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[sandBottom]]></Property>
<Property name="SizeY"><![CDATA[sandHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Image2D</Type>
<Name><![CDATA[brickpath]]></Name>
<Parent><![CDATA[fieldGroup]]></Parent>
<Property name="SizeX"><![CDATA[xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH"]]></Property>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[yMin]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/brickpath.png"]]></Property>
<Property name="SizeY"><![CDATA[rowHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>true</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[roadGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ShapeSet2D</Type>
<Name><![CDATA[shapeSet]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numRaceCars]]></Property>
<Property name="SizeX"><![CDATA[raceCarWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[raceCarX]]></Property>
<Property name="Y"><![CDATA[raceCarY]]></Property>
<Property name="SizeY"><![CDATA[raceCarHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[raceCars]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numRaceCars]]></Property>
<Property name="SizeX"><![CDATA[raceCarWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[raceCarX]]></Property>
<Property name="Y"><![CDATA[raceCarY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/car.png"]]></Property>
<Property name="SizeY"><![CDATA[raceCarHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[yellowCars]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numYellowCars]]></Property>
<Property name="SizeX"><![CDATA[yellowCarWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[yellowCarX]]></Property>
<Property name="Y"><![CDATA[yellowCarY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/stockcar.png"]]></Property>
<Property name="SizeY"><![CDATA[yellowCarHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[redCars]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numRedCars]]></Property>
<Property name="Transformation"><![CDATA[Math.PI]]></Property>
<Property name="SizeX"><![CDATA[redCarWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[redCarX]]></Property>
<Property name="Y"><![CDATA[redCarY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/red-stockcar.png"]]></Property>
<Property name="SizeY"><![CDATA[redCarHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[trucks]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numTrucks]]></Property>
<Property name="SizeX"><![CDATA[truckWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[truckX]]></Property>
<Property name="Y"><![CDATA[truckY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/truck.png"]]></Property>
<Property name="SizeY"><![CDATA[truckHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[bikes]]></Name>
<Parent><![CDATA[roadGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numBikes]]></Property>
<Property name="SizeX"><![CDATA[bikeWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[bikeX]]></Property>
<Property name="Y"><![CDATA[bikeY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/kumoi_bike.png"]]></Property>
<Property name="SizeY"><![CDATA[bikeHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[waterGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[mapleLogs]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numMapleLogs]]></Property>
<Property name="SizeX"><![CDATA[mapleLogWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[mapleLogX]]></Property>
<Property name="Y"><![CDATA[mapleLogY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/log-maple-long.png"]]></Property>
<Property name="SizeY"><![CDATA[mapleLogHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[oakLogs]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numOakLogs]]></Property>
<Property name="SizeX"><![CDATA[oakLogWidth]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[oakLogX]]></Property>
<Property name="Y"><![CDATA[oakLogY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/log-oak-short.png"]]></Property>
<Property name="SizeY"><![CDATA[oakLogHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[boats]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numBoats]]></Property>
<Property name="SizeX"><![CDATA[boatWidth]]></Property>
<Property name="X"><![CDATA[boatX]]></Property>
<Property name="Y"><![CDATA[boatY]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/boat.png"]]></Property>
<Property name="SizeY"><![CDATA[boatHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[fish]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numFish]]></Property>
<Property name="SizeX"><![CDATA[fishWidth]]></Property>
<Property name="X"><![CDATA[fishX]]></Property>
<Property name="Y"><![CDATA[fishY]]></Property>
<Property name="ImageUrl"><![CDATA[%fishImage%]]></Property>
<Property name="SizeY"><![CDATA[fishHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.ImageSet2D</Type>
<Name><![CDATA[turtles]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="NumberOfElements"><![CDATA[numTurtles]]></Property>
<Property name="Transformation"><![CDATA[Math.PI]]></Property>
<Property name="SizeX"><![CDATA[turtleWidth]]></Property>
<Property name="X"><![CDATA[turtleX]]></Property>
<Property name="Y"><![CDATA[turtleY]]></Property>
<Property name="ImageUrl"><![CDATA[%turtleImage%]]></Property>
<Property name="SizeY"><![CDATA[turtleHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[shapeFollowBoat]]></Name>
<Parent><![CDATA[waterGroup]]></Parent>
<Property name="SizeX"><![CDATA[boatWidth]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="LineColor"><![CDATA["Green"]]></Property>
<Property name="X"><![CDATA[boatInPlace>=0 ? boatX[boatInPlace] : 0;]]></Property>
<Property name="Y"><![CDATA[boatY]]></Property>
<Property name="Visibility"><![CDATA[boatInPlace>=0]]></Property>
<Property name="SizeY"><![CDATA[boatHeight]]></Property>
<Property name="LineWidth"><![CDATA[4]]></Property>
<Property name="DrawFill"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Image2D</Type>
<Name><![CDATA[frog]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
<Property name="Transformation"><![CDATA[frogAngle]]></Property>
<Property name="SizeX"><![CDATA[frogWidth]]></Property>
<Property name="Position"><![CDATA[frogPos]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="ImageUrl"><![CDATA[%frogimage%]]></Property>
<Property name="SizeY"><![CDATA[frogHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Image2D</Type>
<Name><![CDATA[willKillYouImage]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
<Property name="SizeX"><![CDATA[0.75*frogWidth]]></Property>
<Property name="Position"><![CDATA[willKillYou]]></Property>
<Property name="ImageUrl"><![CDATA["./pvg_frogger/danger.png"]]></Property>
<Property name="Visibility"><![CDATA[willDie]]></Property>
<Property name="SizeY"><![CDATA[0.75*frogHeight]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[bordersGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[rightBorder]]></Name>
<Parent><![CDATA[bordersGroup]]></Parent>
<Property name="FillColor"><![CDATA["White"]]></Property>
<Property name="SizeX"><![CDATA[3*xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH_WEST"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="X"><![CDATA[xMax]]></Property>
<Property name="Y"><![CDATA[yMin]]></Property>
<Property name="SizeY"><![CDATA[yRange]]></Property>
<Property name="DrawLines"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Shape2D</Type>
<Name><![CDATA[leftBorder]]></Name>
<Parent><![CDATA[bordersGroup]]></Parent>
<Property name="FillColor"><![CDATA["White"]]></Property>
<Property name="SizeX"><![CDATA[3*xRange]]></Property>
<Property name="RelativePosition"><![CDATA["SOUTH_EAST"]]></Property>
<Property name="ShapeType"><![CDATA["RECTANGLE"]]></Property>
<Property name="X"><![CDATA[xMin]]></Property>
<Property name="Y"><![CDATA[yMin]]></Property>
<Property name="SizeY"><![CDATA[yRange]]></Property>
<Property name="DrawLines"><![CDATA[false]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[messageGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[messageY]]></Property>
<Property name="Visibility"><![CDATA[!running]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[messageText]]></Name>
<Parent><![CDATA[messageGroup]]></Parent>
<Property name="FillColor"><![CDATA["Black"]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="Text"><![CDATA[%message%]]></Property>
<Property name="Visibility"><![CDATA[!running]]></Property>
<Property name="Font"><![CDATA["normal bold 22px "]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[gameOverText]]></Name>
<Parent><![CDATA[messageGroup]]></Parent>
<Property name="FillColor"><![CDATA["Red"]]></Property>
<Property name="Y"><![CDATA[yRange/6]]></Property>
<Property name="Text"><![CDATA[%gameOverMessage%]]></Property>
<Property name="Visibility"><![CDATA[gameOver]]></Property>
<Property name="Font"><![CDATA["normal bold 26px "]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[gameResultText]]></Name>
<Parent><![CDATA[messageGroup]]></Parent>
<Property name="FillColor"><![CDATA["White"]]></Property>
<Property name="Y"><![CDATA[yMin + yRange/12]]></Property>
<Property name="Text"><![CDATA[%gameResultMessage%]]></Property>
<Property name="Visibility"><![CDATA[gameOver]]></Property>
<Property name="Font"><![CDATA["normal bold 22px "]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[scoreGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[scoreY]]></Property>
<Property name="Visibility"><![CDATA[SHOW_SCORES]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[scoreTitleText]]></Name>
<Parent><![CDATA[scoreGroup]]></Parent>
<Property name="FillColor"><![CDATA["Orange"]]></Property>
<Property name="RelativePosition"><![CDATA["EAST"]]></Property>
<Property name="X"><![CDATA[xMin+xRange/4]]></Property>
<Property name="Y"><![CDATA[rowHeight]]></Property>
<Property name="Text"><![CDATA["SCORE:"]]></Property>
<Property name="Font"><![CDATA["normal bold 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[scoreText]]></Name>
<Parent><![CDATA[scoreGroup]]></Parent>
<Property name="FillColor"><![CDATA["Yellow"]]></Property>
<Property name="RelativePosition"><![CDATA["WEST"]]></Property>
<Property name="X"><![CDATA[xMin+xRange/4]]></Property>
<Property name="Y"><![CDATA[rowHeight]]></Property>
<Property name="Text"><![CDATA[%scoreText%]]></Property>
<Property name="Font"><![CDATA["normal normal 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[recordTitleText]]></Name>
<Parent><![CDATA[scoreGroup]]></Parent>
<Property name="FillColor"><![CDATA["Orange"]]></Property>
<Property name="SizeX"><![CDATA[0.1]]></Property>
<Property name="RelativePosition"><![CDATA["EAST"]]></Property>
<Property name="X"><![CDATA[xMin+xRange/4]]></Property>
<Property name="Y"><![CDATA[rowHeight/2]]></Property>
<Property name="Text"><![CDATA["RECORD:"]]></Property>
<Property name="Font"><![CDATA["normal bold 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[recordText]]></Name>
<Parent><![CDATA[scoreGroup]]></Parent>
<Property name="FillColor"><![CDATA["Yellow"]]></Property>
<Property name="RelativePosition"><![CDATA["WEST"]]></Property>
<Property name="X"><![CDATA[xMin+xRange/4]]></Property>
<Property name="Y"><![CDATA[rowHeight/2]]></Property>
<Property name="Text"><![CDATA[%recordText%]]></Property>
<Property name="Font"><![CDATA["normal normal 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>false</Expanded>
<Type>Elements.Group2D</Type>
<Name><![CDATA[actionsGroup]]></Name>
<Parent><![CDATA[drawingPanel]]></Parent>
<Property name="X"><![CDATA[xMiddle]]></Property>
<Property name="Y"><![CDATA[actionsY]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[newGameText]]></Name>
<Parent><![CDATA[actionsGroup]]></Parent>
<Property name="FillColor"><![CDATA["Black"]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[resetX]]></Property>
<Property name="Text"><![CDATA["RESTART"]]></Property>
<Property name="Font"><![CDATA["normal bold 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[replayText]]></Name>
<Parent><![CDATA[actionsGroup]]></Parent>
<Property name="FillColor"><![CDATA["Black"]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[replayX]]></Property>
<Property name="Text"><![CDATA["REPLAY"]]></Property>
<Property name="Font"><![CDATA["normal bold 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.Text2D</Type>
<Name><![CDATA[autoplayText]]></Name>
<Parent><![CDATA[actionsGroup]]></Parent>
<Property name="FillColor"><![CDATA["Blue"]]></Property>
<Property name="RelativePosition"><![CDATA["CENTERED"]]></Property>
<Property name="X"><![CDATA[autoplayX]]></Property>
<Property name="Text"><![CDATA["AUTOPLAY:"+autoplayText]]></Property>
<Property name="Visibility"><![CDATA[SHOW_AUTOPLAY]]></Property>
<Property name="Font"><![CDATA["normal bold 20px \"Courier New\", Courier, monospace"]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Expanded>true</Expanded>
<Type>Elements.Panel</Type>
<Name><![CDATA[autoplayPanel]]></Name>
<Property name="CSS"><![CDATA[{ "position":"fixed", 
  "top":"50px", 
  "left":"50%",
  "zIndex":"99999",  
  "marginLeft":"-250px",  
  "overflow":"hidden", 
  "wordWrap":"break-word"
}]]></Property>
<Property name="Background"><![CDATA["Gray"]]></Property>
<Property name="BorderStyle"><![CDATA["solid"]]></Property>
<Property name="BorderColor"><![CDATA["Blue"]]></Property>
<Property name="Visibility"><![CDATA[userAutoplayShowDialog]]></Property>
<Property name="Height"><![CDATA[400]]></Property>
<Property name="BorderWidth"><![CDATA[2]]></Property>
<Property name="Width"><![CDATA[500]]></Property>
</HtmlView.Element>
<HtmlView.Element>
<Type>Elements.TextArea</Type>
<Name><![CDATA[autoplayTextArea]]></Name>
<Parent><![CDATA[autoplayPanel]]></Parent>
<Property name="ChangeColorOnEdit"><![CDATA[false]]></Property>
<Property name="Editable"><![CDATA[true]]></Property>
<Property name="Height"><![CDATA["100%"]]></Property>
<Property name="Width"><![CDATA["100%"]]></Property>
</HtmlView.Element>
</Tree>
</Content>
</Osejs.HtmlView.Page>
</Osejs.HtmlView>
</Osejs>
