document.write('<div class="groovy" style="font-family: monospace;"><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> ArgumentsInterpreterTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> interpreter = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ArgumentsInterpreter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testInterpretsArgumentWithoutValue<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-h\'</span>, argument:<span style="color: #ff0000;">\'printHelp\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'-h\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNotNull<span style="color: #66cc66;">&#40;</span>arguments<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'printHelp\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testInterpretsNoArguments<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertTrue<span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">isEmpty</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testInterpretsArgumentWithValue<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-t\'</span>, argument:<span style="color: #ff0000;">\'tickInterval\'</span>, defaultValue:<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'-t\'</span>, <span style="color: #ff0000;">\'2\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'2\'</span>, arguments.<span style="color: #006600;">tickInterval</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testAcceptsArgumentWithoutDefaultValue<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-h\'</span>, argument:<span style="color: #ff0000;">\'printHelp\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull<span style="color: #66cc66;">&#40;</span>arguments<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'printHelp\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testAcceptsArgumentWithDefaultValue<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-t\'</span>, argument:<span style="color: #ff0000;">\'tickInterval\'</span>, defaultValue:<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'1\'</span>, arguments.<span style="color: #006600;">tickInterval</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testInterpretsTwoArgumentsWithDefaultValues<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-a\'</span>, argument:<span style="color: #ff0000;">\'b\'</span>, defaultValue:<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-c\'</span>, argument:<span style="color: #ff0000;">\'d\'</span>, defaultValue:<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'-a\'</span>, <span style="color: #ff0000;">\'3\'</span>, <span style="color: #ff0000;">\'-c\'</span>, <span style="color: #ff0000;">\'4\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'3\'</span>, arguments.<span style="color: #006600;">b</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'4\'</span>, arguments.<span style="color: #006600;">d</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testInterpretsTwoArgumentsOneWithAndOneWithoutDefaultValue<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-a\'</span>, argument:<span style="color: #ff0000;">\'b\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-c\'</span>, argument:<span style="color: #ff0000;">\'d\'</span>, defaultValue:<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'-a\'</span>, <span style="color: #ff0000;">\'-c\'</span>, <span style="color: #ff0000;">\'2\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNotNull<span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">b</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'2\'</span>, arguments.<span style="color: #006600;">d</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testPrintsSummary<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interpreter <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-d\'</span>, argument:<span style="color: #ff0000;">\'e\'</span>, defaultValue:<span style="color: #cc66cc;">1</span>, description:<span style="color: #ff0000;">\'f\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-a\'</span>, argument:<span style="color: #ff0000;">\'b\'</span>, description:<span style="color: #ff0000;">\'c\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-f\'</span>, argument:<span style="color: #ff0000;">\'long\'</span>, defaultValue:<span style="color: #cc66cc;">2</span>, description:<span style="color: #ff0000;">\'g\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'-a&nbsp; &nbsp; &nbsp; &nbsp; c<span style="color: #000099; font-weight: bold;">\n</span>\'</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">\'-d &lt;e&gt;&nbsp; &nbsp; f;<span style="color: #000099; font-weight: bold;">\n</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default value is 1<span style="color: #000099; font-weight: bold;">\n</span>\'</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">\'-f &lt;long&gt; g;<span style="color: #000099; font-weight: bold;">\n</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default value is 2<span style="color: #000099; font-weight: bold;">\n</span>\'</span>, interpreter.<span style="color: #006600;">summary</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> ConwaysGameOfLifeTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> BLINKER_HORIZONTAL = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp;\', \'XXX\', \'&nbsp; &nbsp;\']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> BLINKER_VERTICAL = <span style="color: #ff0000;">&quot;[\' X \', \' X \', \' X \']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testBlinker<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ConwaysGameOfLife<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createUniverse</span><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> GroovyShell<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">evaluate</span><span style="color: #66cc66;">&#40;</span>BLINKER_HORIZONTAL<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>BLINKER_HORIZONTAL, universe.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>BLINKER_VERTICAL, universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>BLINKER_HORIZONTAL, universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> TOAD_FIRST_TICK = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp; &nbsp; \', \'&nbsp; XXX \', \' XXX&nbsp; \', \'&nbsp; &nbsp; &nbsp; \']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> TOAD_SECOND_TICK = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp;X&nbsp; \', \' X&nbsp; X \', \' X&nbsp; X \', \'&nbsp; X&nbsp; &nbsp;\']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testToad<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ConwaysGameOfLife<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createUniverse</span><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> GroovyShell<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">evaluate</span><span style="color: #66cc66;">&#40;</span>TOAD_FIRST_TICK<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>TOAD_FIRST_TICK, universe.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>TOAD_SECOND_TICK, universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>TOAD_FIRST_TICK, universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> RuleBuilderTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testBuildsRules<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedFrom = <span style="color: #ff0000;">\'a\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedWithLivingNeighbours = <span style="color: #ff0000;">\'b\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedTo = <span style="color: #ff0000;">\'c\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> ruler = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> RuleBuilder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">rules</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule<span style="color: #66cc66;">&#40;</span>from:expectedFrom, withLivingNeighbours:expectedWithLivingNeighbours, to:expectedTo<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, ruler.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = ruler<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>expectedFrom, rule.<span style="color: #006600;">from</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>expectedWithLivingNeighbours, rule.<span style="color: #006600;">withLivingNeighbours</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>expectedTo, rule.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #a1a100;">import org.easymock.EasyMock</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> RulerTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> ruler = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Ruler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testAppliesRuleOnCell<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> ruleMock = EasyMock.<span style="color: #006600;">createMock</span><span style="color: #66cc66;">&#40;</span>IRule.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cellDummy = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Expando<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universeExpando = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Expando<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universeExpando.<span style="color: #006600;">eachCellWithXY</span> = <span style="color: #66cc66;">&#123;</span> closure -&gt; closure.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span style="color: #993399; font-weight: bold;">call</span></a><span style="color: #66cc66;">&#40;</span>cellDummy, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universeExpando.<span style="color: #006600;">switchToNextTick</span> = <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">/*dummy behaviour */</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedNumberRulesAppliedTo = <span style="color: #cc66cc;">2</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ruleMock.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cellDummy<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EasyMock.<span style="color: #006600;">expectLastCall</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20times"><span style="color: #993399;">times</span></a><span style="color: #66cc66;">&#40;</span>expectedNumberRulesAppliedTo<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EasyMock.<span style="color: #006600;">replay</span><span style="color: #66cc66;">&#40;</span>ruleMock<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expectedNumberRulesAppliedTo.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20times"><span style="color: #993399;">times</span></a> <span style="color: #66cc66;">&#123;</span> ruler <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> ruleMock <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ruler.<span style="color: #006600;">applyRulesTo</span><span style="color: #66cc66;">&#40;</span>universeExpando<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EasyMock.<span style="color: #006600;">verify</span><span style="color: #66cc66;">&#40;</span>ruleMock<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testSwitchesUniverseToNextTickAfterApplyingRules<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universeMock = EasyMock.<span style="color: #006600;">createMock</span><span style="color: #66cc66;">&#40;</span>IUniverse.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universeMock.<span style="color: #006600;">switchToNextTick</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EasyMock.<span style="color: #006600;">replay</span><span style="color: #66cc66;">&#40;</span>universeMock<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ruler.<span style="color: #006600;">applyRulesTo</span><span style="color: #66cc66;">&#40;</span>universeMock<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EasyMock.<span style="color: #006600;">verify</span><span style="color: #66cc66;">&#40;</span>universeMock<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> RuleTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> LIVE_CELL = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testDoesntApplyItselfToCellWithDifferentStartStateThenRulesFromState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cell = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull cell.<span style="color: #006600;">nextState</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testAppliesItselfToCellWithSameStartStateThenRulesFromState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cell = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, cell.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testDoesntApplyItselfToCellWithoutEnoughNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, withLivingNeighbours:<span style="color: #cc66cc;">1</span>..<span style="color: #cc66cc;">2</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cell = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull cell.<span style="color: #006600;">nextState</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cell.<span style="color: #006600;">neighbours</span> = <span style="color: #66cc66;">&#91;</span>north:LIVE_CELL, west:LIVE_CELL, south:LIVE_CELL<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull cell.<span style="color: #006600;">nextState</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testAppliesItselfToCellWithEnoughNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, withLivingNeighbours:<span style="color: #cc66cc;">1</span>..<span style="color: #cc66cc;">2</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cellWithOneNeighbour = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cellWithOneNeighbour.<span style="color: #006600;">neighbours</span>.<span style="color: #006600;">north</span> = LIVE_CELL<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cellWithOneNeighbour<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, cellWithOneNeighbour.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> cellWithTwoNeighbours = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cellWithTwoNeighbours.<span style="color: #006600;">neighbours</span>.<span style="color: #006600;">south</span> = LIVE_CELL<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cellWithTwoNeighbours.<span style="color: #006600;">neighbours</span>.<span style="color: #006600;">north</span> = LIVE_CELL<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cellWithTwoNeighbours<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, cellWithTwoNeighbours.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testDoesntApplyAnyRuleOnAlreadyChangedState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> changedCell = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; changedCell.<span style="color: #006600;">nextState</span> = Cell.<span style="color: #006600;">DEAD</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> UniverseTest <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> GroovyTestCase <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testCreatesItselfByWidthAndHeightWithAllDeadCells<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>, Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertSame Cell.<span style="color: #006600;">DEAD</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertSame Cell.<span style="color: #006600;">DEAD</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals <span style="color: #cc66cc;">9</span>, universe.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testCreatesItselfByPatternWithAllDeadCells<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'&nbsp; &nbsp;\'</span>, <span style="color: #ff0000;">\'&nbsp; &nbsp;\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">2</span>, Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span>, universe<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, universe.<span style="color: #006600;">width</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>, universe.<span style="color: #006600;">height</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testCreatesItselfByPatternWithLiveCellsInTheCornersAndInTheMiddle<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>, Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alive</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alive</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alive</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alive</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alive</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>universe, <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'X X\'</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">\' X \'</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">\'X X\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testCountsNeighboursByState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>, Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals <span style="color: #cc66cc;">3</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">countLiveNeighbours</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals <span style="color: #cc66cc;">5</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">countLiveNeighbours</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals <span style="color: #cc66cc;">8</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">countLiveNeighbours</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testIteratesOverEachCellWithxAndYCoords<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">1</span>, Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> counter = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<span style="color: #006600;">eachCellWithXY</span><span style="color: #66cc66;">&#123;</span> cell, x, y -&gt; cell.<span style="color: #006600;">state</span> = Cell.<span style="color: #006600;">DEAD</span>; counter++ <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>, counter<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> testSwitchesToNextTick<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">1</span>, Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">nextState</span> = Cell.<span style="color: #006600;">DEAD</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<span style="color: #006600;">switchToNextTick</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">LIVE</span>, universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull<span style="color: #66cc66;">&#40;</span>universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertNull<span style="color: #66cc66;">&#40;</span>universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> ArgumentsInterpreter <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedArguments = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> interpret<span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = createDefaultArguments<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; args.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20eachWithIndex"><span style="color: #663399;">eachWithIndex</span></a><span style="color: #66cc66;">&#123;</span> arg, index -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>arg <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20in"><span style="color: #b1b100;">in</span></a> expectedArguments.<span style="color: #006600;">keySet</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> expectedArgument = expectedArguments<span style="color: #66cc66;">&#91;</span>arg<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>!expectedArgument.<span style="color: #006600;">defaultValue</span><span style="color: #66cc66;">&#41;</span> arguments<span style="color: #66cc66;">&#91;</span>expectedArgument.<span style="color: #006600;">argument</span><span style="color: #66cc66;">&#93;</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20true"><span style="color: #000000; font-weight: bold;">true</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> arguments<span style="color: #66cc66;">&#91;</span>expectedArgument.<span style="color: #006600;">argument</span><span style="color: #66cc66;">&#93;</span> = args<span style="color: #66cc66;">&#91;</span>index + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> arguments<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> leftShift<span style="color: #66cc66;">&#40;</span>expectedArgument<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expectedArguments<span style="color: #66cc66;">&#91;</span>expectedArgument.<span style="color: #006600;">shortcut</span><span style="color: #66cc66;">&#93;</span> = expectedArgument<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> createDefaultArguments<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;expectedArguments.<span style="color: #006600;">values</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20each"><span style="color: #663399;">each</span></a><span style="color: #66cc66;">&#123;</span> expectedArgument -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>expectedArgument.<span style="color: #006600;">defaultValue</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arguments<span style="color: #66cc66;">&#91;</span>expectedArgument.<span style="color: #006600;">argument</span><span style="color: #66cc66;">&#93;</span> = expectedArgument.<span style="color: #006600;">defaultValue</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20as"><span style="color: #000000; font-weight: bold;">as</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arguments<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getSummary<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = expectedArguments.<span style="color: #006600;">values</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arguments = arguments.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20sort"><span style="color: #663399;">sort</span></a><span style="color: #66cc66;">&#123;</span> it.<span style="color: #006600;">shortcut</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> longestArgument = arguments.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20findAll"><span style="color: #663399;">findAll</span></a><span style="color: #66cc66;">&#123;</span> it.<span style="color: #006600;">defaultValue</span> <span style="color: #66cc66;">&#125;</span>.<span style="color: #006600;">argument</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20sort"><span style="color: #663399;">sort</span></a><span style="color: #66cc66;">&#123;</span> it.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> summary = <span style="color: #ff0000;">\'\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arguments.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20each"><span style="color: #663399;">each</span></a><span style="color: #66cc66;">&#123;</span> argument -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= argument.<span style="color: #006600;">shortcut</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> argumentPart = <span style="color: #ff0000;">\' \'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>argument.<span style="color: #006600;">defaultValue</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; argumentPart = <span style="color: #ff0000;">&quot; &lt;${argument.argument}&gt; &quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= argumentPart.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20padRight"><span style="color: #CC0099;">padRight</span></a><span style="color: #66cc66;">&#40;</span>longestArgument + <span style="color: #cc66cc;">4</span>, <span style="color: #ff0000;">\' \'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= argument.<span style="color: #006600;">description</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>argument.<span style="color: #006600;">defaultValue</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= <span style="color: #ff0000;">\';<span style="color: #000099; font-weight: bold;">\n</span>\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= <span style="color: #ff0000;">\' \'</span> * <span style="color: #66cc66;">&#40;</span>longestArgument + <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= <span style="color: #ff0000;">&quot;default value is ${argument.defaultValue}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a>= <span style="color: #ff0000;">\'<span style="color: #000099; font-weight: bold;">\n</span>\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; summary.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Cell <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> DEAD = CellState.<span style="color: #006600;">DEAD</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> LIVE = CellState.<span style="color: #006600;">LIVE</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> state = DEAD<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> nextState<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> neighbours = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Cell<span style="color: #66cc66;">&#40;</span>CellState state<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a>.<span style="color: #006600;">state</span> = state<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Cell<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20char"><span style="color: #993333;">char</span></a> statePattern<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state = CellState.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20get"><span style="color: #663399;">get</span></a><span style="color: #66cc66;">&#40;</span>statePattern<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> countLiveNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20findAll"><span style="color: #663399;">findAll</span></a><span style="color: #66cc66;">&#123;</span> entry -&gt; LIVE == entry.<span style="color: #006600;">value</span>?.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#125;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> alive<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> state = LIVE <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> CellState <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> LIVE = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> CellState<span style="color: #66cc66;">&#40;</span>state:<span style="color: #ff0000;">\'X\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> DEAD = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> CellState<span style="color: #66cc66;">&#40;</span>state:<span style="color: #ff0000;">\' \'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> state<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20get"><span style="color: #663399;">get</span></a><span style="color: #66cc66;">&#40;</span>statePattern<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>statePattern == LIVE.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> LIVE<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEAD<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> state <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> ConwaysGameOfLife <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> RULER = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> RuleBuilder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">rules</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, withLivingNeighbours:<span style="color: #cc66cc;">0</span>..<span style="color: #cc66cc;">1</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, withLivingNeighbours:<span style="color: #cc66cc;">3</span>..<span style="color: #cc66cc;">9</span>, to:Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">LIVE</span>, withLivingNeighbours:<span style="color: #cc66cc;">2</span>..<span style="color: #cc66cc;">3</span>, to:Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule<span style="color: #66cc66;">&#40;</span>from:Cell.<span style="color: #006600;">DEAD</span>, withLivingNeighbours:<span style="color: #cc66cc;">3</span>, to:Cell.<span style="color: #006600;">LIVE</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> createUniverse<span style="color: #66cc66;">&#40;</span>pattern<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Universe<span style="color: #66cc66;">&#40;</span>pattern<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RULER.<span style="color: #006600;">applyRulesTo</span><span style="color: #66cc66;">&#40;</span>universe<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> eachCellWithXY<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> closure<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe.<span style="color: #006600;">eachCellWithXY</span><span style="color: #66cc66;">&#40;</span>closure<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getHeight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe.<span style="color: #006600;">height</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getWidth<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe.<span style="color: #006600;">width</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> ExpectedArgument <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> shortcut<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> argument<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> defaultValue<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> description<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> shortcut <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20interface"><span style="color: #000000; font-weight: bold;">interface</span></a> IRule <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> applyTo<span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20interface"><span style="color: #000000; font-weight: bold;">interface</span></a> IUniverse <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> switchToNextTick<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #a1a100;">import groovy.swing.SwingBuilder</span><br />');
document.write('<span style="color: #a1a100;">import javax.swing.JComponent</span><br />');
document.write('<span style="color: #a1a100;">import java.awt.Color</span><br />');
document.write('<span style="color: #a1a100;">import javax.swing.WindowConstants</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Main <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> TOAD = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp; &nbsp; \',\'&nbsp; XXX \',\' XXX&nbsp; \',\'&nbsp; &nbsp; &nbsp; \']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> BLINKER = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp;\',\'XXX\',\'&nbsp; &nbsp;\']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> GUN = <span style="color: #ff0000;">&quot;[\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XX&nbsp; &nbsp; &nbsp; XX&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XX\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;X&nbsp; &nbsp;X&nbsp; &nbsp; XX&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XX\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'XX&nbsp; &nbsp; &nbsp; &nbsp; X&nbsp; &nbsp; &nbsp;X&nbsp; &nbsp;XX&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'XX&nbsp; &nbsp; &nbsp; &nbsp; X&nbsp; &nbsp;X XX&nbsp; &nbsp; X X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X&nbsp; &nbsp; &nbsp;X&nbsp; &nbsp; &nbsp; &nbsp;X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;X&nbsp; &nbsp;X&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XX&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \',&quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \',&quot;</span> * <span style="color: #cc66cc;">18</span><span style="color: #66cc66;">&#41;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;\'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \']&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> main<span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> interpreter = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ArgumentsInterpreter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-h\'</span>, argument:<span style="color: #ff0000;">\'printHelp\'</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description:<span style="color: #ff0000;">\'prints this help text\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-t\'</span>, argument:<span style="color: #ff0000;">\'tickInterval\'</span>, defaultValue:<span style="color: #cc66cc;">200</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description:<span style="color: #ff0000;">\'sets the tick interval in milliseconds\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-p\'</span>, argument:<span style="color: #ff0000;">\'pattern\'</span>, defaultValue:TOAD,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description:<span style="color: #ff0000;">\'sets the inital pattern (try TOAD, BLINKER or GUN)\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-b\'</span>, argument:<span style="color: #ff0000;">\'blockSize\'</span>, defaultValue:<span style="color: #cc66cc;">10</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description:<span style="color: #ff0000;">\'sets the length of a block in pixel\'</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ExpectedArgument<span style="color: #66cc66;">&#40;</span>shortcut:<span style="color: #ff0000;">\'-v\'</span>, argument:<span style="color: #ff0000;">\'view\'</span>, defaultValue:<span style="color: #ff0000;">\'swing\'</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description:<span style="color: #ff0000;">\'sets the view to &lt;swing&gt; or &lt;console&gt;\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> arguments = interpreter.<span style="color: #006600;">interpret</span><span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">printHelp</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printHelp<span style="color: #66cc66;">&#40;</span>interpreter<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> pattern = calculatePattern<span style="color: #66cc66;">&#40;</span>arguments<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> ConwaysGameOfLife<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createUniverse</span><span style="color: #66cc66;">&#40;</span>pattern<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> view = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> GroovyShell<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Binding&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Binding</span></a><span style="color: #66cc66;">&#40;</span>Main:Main.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">evaluate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Main.&amp;${arguments.view}&quot;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view<span style="color: #66cc66;">&#40;</span>universe, arguments<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> calculatePattern<span style="color: #66cc66;">&#40;</span>arguments<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">pattern</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> != <span style="color: #ff0000;">\'[\'</span><span style="color: #66cc66;">&#41;</span> arguments.<span style="color: #006600;">pattern</span> = Main.<span style="color: #ff0000;">&quot;${arguments.pattern}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20return"><span style="color: #000000; font-weight: bold;">return</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> GroovyShell<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Binding&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Binding</span></a><span style="color: #66cc66;">&#40;</span>Main:Main.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">evaluate</span><span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">pattern</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> printHelp<span style="color: #66cc66;">&#40;</span>interpreter<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span style="color: #993399;">println</span></a> <span style="color: #ff0000;">\'Usage: java -jar conwaysgame.jar [arguments]<span style="color: #000099; font-weight: bold;">\n</span>\'</span> + interpreter.<span style="color: #006600;">summary</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> console<span style="color: #66cc66;">&#40;</span>universe, arguments<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20while"><span style="color: #b1b100;">while</span></a><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20true"><span style="color: #000000; font-weight: bold;">true</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span style="color: #993399;">println</span></a> universe.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span>..<span style="color: #cc66cc;">-3</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'<span style="color: #000099; font-weight: bold;">\\'</span>, <span style="color: #000099; font-weight: bold;">\\'</span>\'</span><span style="color: #66cc66;">&#41;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20join"><span style="color: #663399;">join</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'<span style="color: #000099; font-weight: bold;">\n</span>\'</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe = universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Thread&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Thread</span></a>.<span style="color: #006600;">sleep</span><span style="color: #66cc66;">&#40;</span>arguments.<span style="color: #006600;">tickInterval</span>.<span style="color: #006600;">toInteger</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> swing<span style="color: #66cc66;">&#40;</span>universe, arguments<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> swing = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> SwingBuilder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> blockSize = arguments.<span style="color: #006600;">blockSize</span>.<span style="color: #006600;">toInteger</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a> = <span style="color: #66cc66;">&#91;</span>universe.<span style="color: #006600;">width</span> * blockSize, universe.<span style="color: #006600;">height</span> * blockSize<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> painterPanel = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> PainterPanel<span style="color: #66cc66;">&#40;</span>blockSize:blockSize, universe:universe,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tickInterval:arguments.<span style="color: #006600;">tickInterval</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> frame = swing.<span style="color: #006600;">frame</span> <span style="color: #66cc66;">&#40;</span>title:<span style="color: #ff0000;">\'Conway<span style="color: #000099; font-weight: bold;">\\'</span>s Game of Life in Groovy\'</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a>: <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a>, defaultCloseOperation:<a target="_blank"&nbsp; href="http://www.google.de/search?as_q=WindowConstants&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">WindowConstants</span></a>.<span style="color: #006600;">EXIT_ON_CLOSE</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; widget<span style="color: #66cc66;">&#40;</span>painterPanel, minimumSize: <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a>, preferredSize: <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a>, maximumSize: <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame.<span style="color: #006600;">pack</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame.<span style="color: #006600;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; painterPanel.<span style="color: #006600;">run</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> PainterPanel <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=JComponent&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">JComponent</span></a> <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> blockSize<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> tickInterval<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> paintComponent<span style="color: #66cc66;">&#40;</span>java.<span style="color: #006600;">awt</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Graphics&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Graphics</span></a> graphics<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<span style="color: #006600;">eachCellWithXY</span><span style="color: #66cc66;">&#123;</span> cell, x, y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>Cell.<span style="color: #006600;">DEAD</span> == cell.<span style="color: #006600;">state</span><span style="color: #66cc66;">&#41;</span> graphics.<span style="color: #006600;">color</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Color&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">WHITE</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20else"><span style="color: #b1b100;">else</span></a> graphics.<span style="color: #006600;">color</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Color&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">BLACK</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">fillRect</span><span style="color: #66cc66;">&#40;</span>y * blockSize, x * blockSize, blockSize, blockSize<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">color</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Color&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">GRAY</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span>y * blockSize, x * blockSize, blockSize, blockSize<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> run<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20while"><span style="color: #b1b100;">while</span></a><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20true"><span style="color: #000000; font-weight: bold;">true</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Thread&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Thread</span></a>.<span style="color: #006600;">sleep</span><span style="color: #66cc66;">&#40;</span>tickInterval.<span style="color: #006600;">toInteger</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe = universe.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Rule <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20implements"><span style="color: #000000; font-weight: bold;">implements</span></a> IRule <span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> from<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> withLivingNeighbours = <span style="color: #cc66cc;">0</span>..<a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Integer&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a>.<span style="color: #006600;">MAX_VALUE</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> to<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> applyTo<span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> fire = from == cell.<span style="color: #006600;">state</span> &amp;&amp; cell.<span style="color: #006600;">countLiveNeighbours</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20in"><span style="color: #b1b100;">in</span></a> withLivingNeighbours<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>fire<span style="color: #66cc66;">&#41;</span> cell.<span style="color: #006600;">nextState</span> = to<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #ff0000;">&quot;Rule changes cells from &lt;${from}&gt; to &lt;${to}&gt; &quot;</span> +<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;if number of neighbours is within ${withLivingNeighbours}.&quot;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> RuleBuilder <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span style="color: #000000; font-weight: bold;">extends</span></a> BuilderSupport <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20static"><span style="color: #000000; font-weight: bold;">static</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> DEBUG = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20false"><span style="color: #000000; font-weight: bold;">false</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> ruler<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> setParent<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> parent, <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> child<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> createNode<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> name<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; ruler = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Ruler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">\'createNode name\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>${name}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; ruler<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> createNode<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> name, <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">\'createNode name value\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>${name} ${value}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> createNode<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> name, <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Map&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Map</span></a> attributes<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">\'createNode name attributes\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>${name} ${attributes}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; ruler <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Rule<span style="color: #66cc66;">&#40;</span>attributes<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> createNode<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> name, <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Map&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Map</span></a> attributes, <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=Object&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">\'createNode name attributes value\'</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; debug <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>${name} ${attributes} ${value}&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> debug<span style="color: #66cc66;">&#40;</span>message<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>DEBUG<span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20println"><span style="color: #993399;">println</span></a> message<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Ruler <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rules = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> leftShift<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rule<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rules <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20&amp;lt;"><span style="color: #b1b100;">&lt;&lt;</span></a> rule<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getAt<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> index<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rules<span style="color: #66cc66;">&#91;</span>index<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> applyRulesTo<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> universe<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rules.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20each"><span style="color: #663399;">each</span></a><span style="color: #66cc66;">&#123;</span> rule -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<span style="color: #006600;">eachCellWithXY</span><span style="color: #66cc66;">&#123;</span> cell, x, y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule.<span style="color: #006600;">applyTo</span><span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<span style="color: #006600;">switchToNextTick</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> rules.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span style="color: #000000; font-weight: bold;">class</span></a> Universe <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20implements"><span style="color: #000000; font-weight: bold;">implements</span></a> IUniverse <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> universe = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20as"><span style="color: #000000; font-weight: bold;">as</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=TreeMap&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">TreeMap</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Universe<span style="color: #66cc66;">&#40;</span>width, height, state<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; init<span style="color: #66cc66;">&#40;</span>width, height, state<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linkNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Universe<span style="color: #66cc66;">&#40;</span>pattern<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; init<span style="color: #66cc66;">&#40;</span>pattern<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, pattern.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, Cell.<span style="color: #006600;">DEAD</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pattern.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20eachWithIndex"><span style="color: #663399;">eachWithIndex</span></a><span style="color: #66cc66;">&#123;</span> row, x -&gt; row.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20eachWithIndex"><span style="color: #663399;">eachWithIndex</span></a><span style="color: #66cc66;">&#123;</span> statePattern, y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y<span style="color: #66cc66;">&#93;</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>statePattern <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20as"><span style="color: #000000; font-weight: bold;">as</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20char"><span style="color: #993333;">char</span></a><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linkNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> init<span style="color: #66cc66;">&#40;</span>width, height, state<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createCells<span style="color: #66cc66;">&#40;</span>width, height, state<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> createCells<span style="color: #66cc66;">&#40;</span>width, height, state<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20times"><span style="color: #993399;">times</span></a><span style="color: #66cc66;">&#123;</span> x -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20times"><span style="color: #993399;">times</span></a> <span style="color: #66cc66;">&#123;</span> y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>!universe<span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> universe<span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20as"><span style="color: #000000; font-weight: bold;">as</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=TreeMap&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">TreeMap</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y<span style="color: #66cc66;">&#93;</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20new"><span style="color: #000000; font-weight: bold;">new</span></a> Cell<span style="color: #66cc66;">&#40;</span>state<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20private"><span style="color: #000000; font-weight: bold;">private</span></a> linkNeighbours<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eachCellWithXY<span style="color: #66cc66;">&#123;</span> cell, x, y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> neighbours = cell.<span style="color: #006600;">neighbours</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">east</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">southeast</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">south</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">west</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">southwest</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">north</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">northeast</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; neighbours.<span style="color: #006600;">northwest</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20this"><span style="color: #000000; font-weight: bold;">this</span></a><span style="color: #66cc66;">&#91;</span>x + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getAt<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> key<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe<span style="color: #66cc66;">&#91;</span>key<span style="color: #66cc66;">&#93;</span> ? universe<span style="color: #66cc66;">&#91;</span>key<span style="color: #66cc66;">&#93;</span> : <span style="color: #66cc66;">&#91;</span>:<span style="color: #66cc66;">&#93;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?as_q=String&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Fapi%2F"><span style="color: #aaaadd; font-weight: bold;">String</span></a> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> rows = universe.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20collect"><span style="color: #663399;">collect</span></a><span style="color: #66cc66;">&#123;</span> entry -&gt; entry.<span style="color: #006600;">value</span>.<span style="color: #006600;">values</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20join"><span style="color: #663399;">join</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'\'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rows.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20collect"><span style="color: #663399;">collect</span></a><span style="color: #66cc66;">&#123;</span> <span style="color: #ff0000;">\'<span style="color: #000099; font-weight: bold;">\\'</span>\'</span> + it + <span style="color: #ff0000;">\'<span style="color: #000099; font-weight: bold;">\\'</span>\'</span><span style="color: #66cc66;">&#125;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20boolean"><span style="color: #993333;">boolean</span></a> equals<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> object<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == object.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> eachCellWithXY<span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> closure<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; universe.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20each"><span style="color: #663399;">each</span></a><span style="color: #66cc66;">&#123;</span> x, row -&gt;&nbsp; row.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20each"><span style="color: #663399;">each</span></a><span style="color: #66cc66;">&#123;</span> y, cell -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; closure.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20call"><span style="color: #993399; font-weight: bold;">call</span></a><span style="color: #66cc66;">&#40;</span>cell, x, y<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span style="color: #993333;">void</span></a> switchToNextTick<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eachCellWithXY<span style="color: #66cc66;">&#123;</span> cell, x, y -&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20if"><span style="color: #b1b100;">if</span></a><span style="color: #66cc66;">&#40;</span>cell.<span style="color: #006600;">nextState</span><span style="color: #66cc66;">&#41;</span> cell.<span style="color: #006600;">state</span> = cell.<span style="color: #006600;">nextState</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cell.<span style="color: #006600;">nextState</span> = <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20null"><span style="color: #000000; font-weight: bold;">null</span></a><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getHeight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20def"><span style="color: #000000; font-weight: bold;">def</span></a> getWidth<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> universe<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<a target="_blank"&nbsp; href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20size"><span style="color: #663399;">size</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/642/1/" target="_blank">byteMyCode</a>.</div>');

