<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_111) on Mon Dec 19 20:43:57 CET 2016 --> <title>World</title> <meta name="date" content="2016-12-19"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <script type="text/javascript" src="../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="World"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-all.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Ecologia</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../controller/OccupantType.html" title="enum in controller"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../index.html?controller/World.html" target="_top">Frames</a></li> <li><a href="World.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">controller</div> <h2 title="Class World" class="title">Class World</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>controller.World</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">World</span> extends java.lang.Object</pre> <div class="block">The World class acts as a communicator between the model and the view packages. It receives the current status of the simulation from model and passes it on to view. Conversely, user input from view is forwarded to model. It also stores all simulation settings.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>private java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Integer>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#animals">animals</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#autorun">autorun</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#averageGrassDensity">averageGrassDensity</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#carnivoreCounter">carnivoreCounter</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#herbivoreCounter">herbivoreCounter</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#highestGeneration">highestGeneration</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private <a href="../controller/Humidity.html" title="enum in controller">Humidity</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#humidity">humidity</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private java.util.ArrayList<java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#news">news</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#nextID">nextID</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#running">running</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#size">size</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#startEnergyCarnivores">startEnergyCarnivores</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#startEnergyHerbivores">startEnergyHerbivores</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#startGrassDensity">startGrassDensity</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#startNoCarnivores">startNoCarnivores</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#startNoHerbivores">startNoHerbivores</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#stopAt">stopAt</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#timelapse">timelapse</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#turn">turn</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>private int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#waterTiles">waterTiles</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>private static <a href="../controller/World.html" title="class in controller">World</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#world">world</a></span></code> </td> </tr> </table> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier</th> <th class="colLast" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>private </code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#World--">World</a></span>()</code> <div class="block">This class implements Singleton, therefore the constructor is private.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>java.util.ArrayList<java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#collectNews--">collectNews</a></span>()</code> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>java.util.HashMap<java.lang.String,java.lang.Integer></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getAnimalInfo-int-int-">getAnimalInfo</a></span>(int x, int y)</code> <div class="block">Return information about the animal at the given position as a hash map</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getAutorun--">getAutorun</a></span>()</code> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getAverageGrassDensity--">getAverageGrassDensity</a></span>()</code> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getCarnivoreCount--">getCarnivoreCount</a></span>()</code> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>java.util.HashMap<java.lang.String,java.lang.Integer></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getDefaultGenome-controller.OccupantType-">getDefaultGenome</a></span>(<a href="../controller/OccupantType.html" title="enum in controller">OccupantType</a> type)</code> <div class="block">Return a hash map holding all the genome values</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>java.util.HashMap<java.lang.String,java.lang.Integer></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getFieldInfo-int-int-">getFieldInfo</a></span>(int x, int y)</code> <div class="block">Return information about the map field at the given position as a hash map</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getGeneration--">getGeneration</a></span>()</code> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getHerbivoreCount--">getHerbivoreCount</a></span>()</code> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code><a href="../controller/Humidity.html" title="enum in controller">Humidity</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getHumidity--">getHumidity</a></span>()</code> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>static <a href="../controller/World.html" title="class in controller">World</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getInstance--">getInstance</a></span>()</code> <div class="block">The Singleton method.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getNextID--">getNextID</a></span>()</code> <div class="block">Get the next unique animal ID number and increment the counter.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>int[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getSize--">getSize</a></span>()</code> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStartEnergyCarnivores--">getStartEnergyCarnivores</a></span>()</code> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStartEnergyHerbivores--">getStartEnergyHerbivores</a></span>()</code> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStartGrassDensity--">getStartGrassDensity</a></span>()</code> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStartNoCarnivores--">getStartNoCarnivores</a></span>()</code> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStartNoHerbivores--">getStartNoHerbivores</a></span>()</code> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getStopAt--">getStopAt</a></span>()</code> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getTimelapse--">getTimelapse</a></span>()</code> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getTurn--">getTurn</a></span>()</code> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#getWaterTiles--">getWaterTiles</a></span>()</code> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#giveNews-java.lang.String-">giveNews</a></span>(java.lang.String message)</code> <div class="block">Display a news item - calling with null as a parameter resets the news list</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#incGeneration-int-">incGeneration</a></span>(int n)</code> <div class="block">Increment the generation counter as necessary.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#incrementTurn--">incrementTurn</a></span>()</code> <div class="block">Increment the turn variable by one.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#isRunning--">isRunning</a></span>()</code> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#readConfigFile-java.lang.String-">readConfigFile</a></span>(java.lang.String filename)</code> <div class="block">Read and parse a config file.</div> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#reset--">reset</a></span>()</code> <div class="block">Reset the world run-time variables, ready for a new run.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setAnimals-java.util.ArrayList-">setAnimals</a></span>(java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Integer>> animalInfo)</code> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setAutorun-int-">setAutorun</a></span>(int autorun)</code> </td> </tr> <tr id="i30" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setAverageGrassDensity-int-">setAverageGrassDensity</a></span>(int averageGrassDensity)</code> </td> </tr> <tr id="i31" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setCarnivoreCount-int-">setCarnivoreCount</a></span>(int carnivoreCounter)</code> </td> </tr> <tr id="i32" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setDefaultGenome-controller.OccupantType-int-int-int-int-int-int-int-int-int-int-int-">setDefaultGenome</a></span>(<a href="../controller/OccupantType.html" title="enum in controller">OccupantType</a> type, int mutationRate, int speed, int stamina, int sight, int metabolism, int ageLimit, int strength, int reproductiveEnergy, int maturityAge, int gestation, int reproductionRate)</code> <div class="block">Interface for the Genome method</div> </td> </tr> <tr id="i33" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setHerbivoreCount-int-">setHerbivoreCount</a></span>(int herbivoreCounter)</code> </td> </tr> <tr id="i34" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setHumidity-controller.Humidity-">setHumidity</a></span>(<a href="../controller/Humidity.html" title="enum in controller">Humidity</a> humidity)</code> </td> </tr> <tr id="i35" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setRunning-boolean-">setRunning</a></span>(boolean running)</code> </td> </tr> <tr id="i36" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setSize-int:A-">setSize</a></span>(int[] size)</code> </td> </tr> <tr id="i37" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartEnergyCarnivores-int-">setStartEnergyCarnivores</a></span>(int startEnergyCarnivores)</code> </td> </tr> <tr id="i38" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartEnergyHerbivores-int-">setStartEnergyHerbivores</a></span>(int startEnergyHerbivores)</code> </td> </tr> <tr id="i39" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartGrassDensity-int-">setStartGrassDensity</a></span>(int startGrassDensity)</code> </td> </tr> <tr id="i40" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartNoCarnivores-int-">setStartNoCarnivores</a></span>(int startNoCarnivores)</code> </td> </tr> <tr id="i41" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartNoHerbivores-int-">setStartNoHerbivores</a></span>(int startNoHerbivores)</code> </td> </tr> <tr id="i42" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStartNoWaterTiles-int-">setStartNoWaterTiles</a></span>(int startNoWaterTiles)</code> </td> </tr> <tr id="i43" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setStopAt-int-">setStopAt</a></span>(int stopAt)</code> </td> </tr> <tr id="i44" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../controller/World.html#setTimelapse-int-">setTimelapse</a></span>(int timelapse)</code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="world"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>world</h4> <pre>private static <a href="../controller/World.html" title="class in controller">World</a> world</pre> </li> </ul> <a name="size"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>size</h4> <pre>private int[] size</pre> </li> </ul> <a name="timelapse"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>timelapse</h4> <pre>private int timelapse</pre> </li> </ul> <a name="stopAt"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stopAt</h4> <pre>private int stopAt</pre> </li> </ul> <a name="autorun"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>autorun</h4> <pre>private int autorun</pre> </li> </ul> <a name="humidity"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>humidity</h4> <pre>private <a href="../controller/Humidity.html" title="enum in controller">Humidity</a> humidity</pre> </li> </ul> <a name="startGrassDensity"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startGrassDensity</h4> <pre>private int startGrassDensity</pre> </li> </ul> <a name="waterTiles"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>waterTiles</h4> <pre>private int waterTiles</pre> </li> </ul> <a name="startNoCarnivores"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startNoCarnivores</h4> <pre>private int startNoCarnivores</pre> </li> </ul> <a name="startNoHerbivores"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startNoHerbivores</h4> <pre>private int startNoHerbivores</pre> </li> </ul> <a name="startEnergyCarnivores"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startEnergyCarnivores</h4> <pre>private int startEnergyCarnivores</pre> </li> </ul> <a name="startEnergyHerbivores"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startEnergyHerbivores</h4> <pre>private int startEnergyHerbivores</pre> </li> </ul> <a name="running"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>running</h4> <pre>private boolean running</pre> </li> </ul> <a name="turn"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>turn</h4> <pre>private int turn</pre> </li> </ul> <a name="nextID"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>nextID</h4> <pre>private int nextID</pre> </li> </ul> <a name="herbivoreCounter"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>herbivoreCounter</h4> <pre>private int herbivoreCounter</pre> </li> </ul> <a name="carnivoreCounter"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>carnivoreCounter</h4> <pre>private int carnivoreCounter</pre> </li> </ul> <a name="highestGeneration"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>highestGeneration</h4> <pre>private int highestGeneration</pre> </li> </ul> <a name="averageGrassDensity"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>averageGrassDensity</h4> <pre>private int averageGrassDensity</pre> </li> </ul> <a name="animals"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>animals</h4> <pre>private java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Integer>> animals</pre> </li> </ul> <a name="news"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>news</h4> <pre>private java.util.ArrayList<java.lang.String> news</pre> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="World--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>World</h4> <pre>private World()</pre> <div class="block">This class implements Singleton, therefore the constructor is private.</div> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getInstance--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInstance</h4> <pre>public static <a href="../controller/World.html" title="class in controller">World</a> getInstance()</pre> <div class="block">The Singleton method.</div> </li> </ul> <a name="readConfigFile-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readConfigFile</h4> <pre>public void readConfigFile(java.lang.String filename)</pre> <div class="block">Read and parse a config file. XXX This is really messy, but it works.</div> </li> </ul> <a name="reset--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>reset</h4> <pre>public void reset()</pre> <div class="block">Reset the world run-time variables, ready for a new run. This method should only be called from the Ecologia main class!</div> </li> </ul> <a name="giveNews-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>giveNews</h4> <pre>public void giveNews(java.lang.String message)</pre> <div class="block">Display a news item - calling with null as a parameter resets the news list</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>news</code> - </dd> </dl> </li> </ul> <a name="getAnimalInfo-int-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAnimalInfo</h4> <pre>public java.util.HashMap<java.lang.String,java.lang.Integer> getAnimalInfo(int x, int y)</pre> <div class="block">Return information about the animal at the given position as a hash map</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>x,</code> - y</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>HashMap, or null if no animal at the specified location</dd> </dl> </li> </ul> <a name="getFieldInfo-int-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getFieldInfo</h4> <pre>public java.util.HashMap<java.lang.String,java.lang.Integer> getFieldInfo(int x, int y)</pre> <div class="block">Return information about the map field at the given position as a hash map</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>x,</code> - y</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>HashMap, or null if out of bounds</dd> </dl> </li> </ul> <a name="getDefaultGenome-controller.OccupantType-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDefaultGenome</h4> <pre>public java.util.HashMap<java.lang.String,java.lang.Integer> getDefaultGenome(<a href="../controller/OccupantType.html" title="enum in controller">OccupantType</a> type)</pre> <div class="block">Return a hash map holding all the genome values</div> </li> </ul> <a name="setDefaultGenome-controller.OccupantType-int-int-int-int-int-int-int-int-int-int-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setDefaultGenome</h4> <pre>public void setDefaultGenome(<a href="../controller/OccupantType.html" title="enum in controller">OccupantType</a> type, int mutationRate, int speed, int stamina, int sight, int metabolism, int ageLimit, int strength, int reproductiveEnergy, int maturityAge, int gestation, int reproductionRate)</pre> <div class="block">Interface for the Genome method</div> </li> </ul> <a name="getSize--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSize</h4> <pre>public int[] getSize()</pre> </li> </ul> <a name="setSize-int:A-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setSize</h4> <pre>public void setSize(int[] size)</pre> </li> </ul> <a name="getTimelapse--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getTimelapse</h4> <pre>public int getTimelapse()</pre> </li> </ul> <a name="setTimelapse-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setTimelapse</h4> <pre>public void setTimelapse(int timelapse)</pre> </li> </ul> <a name="getStopAt--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStopAt</h4> <pre>public int getStopAt()</pre> </li> </ul> <a name="setStopAt-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStopAt</h4> <pre>public void setStopAt(int stopAt)</pre> </li> </ul> <a name="getAutorun--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAutorun</h4> <pre>public int getAutorun()</pre> </li> </ul> <a name="setAutorun-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAutorun</h4> <pre>public void setAutorun(int autorun)</pre> </li> </ul> <a name="getHumidity--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHumidity</h4> <pre>public <a href="../controller/Humidity.html" title="enum in controller">Humidity</a> getHumidity()</pre> </li> </ul> <a name="setHumidity-controller.Humidity-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setHumidity</h4> <pre>public void setHumidity(<a href="../controller/Humidity.html" title="enum in controller">Humidity</a> humidity)</pre> </li> </ul> <a name="getStartGrassDensity--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartGrassDensity</h4> <pre>public int getStartGrassDensity()</pre> </li> </ul> <a name="setStartGrassDensity-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartGrassDensity</h4> <pre>public void setStartGrassDensity(int startGrassDensity)</pre> </li> </ul> <a name="getWaterTiles--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getWaterTiles</h4> <pre>public int getWaterTiles()</pre> </li> </ul> <a name="setStartNoWaterTiles-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartNoWaterTiles</h4> <pre>public void setStartNoWaterTiles(int startNoWaterTiles)</pre> </li> </ul> <a name="getStartNoCarnivores--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartNoCarnivores</h4> <pre>public int getStartNoCarnivores()</pre> </li> </ul> <a name="setStartNoCarnivores-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartNoCarnivores</h4> <pre>public void setStartNoCarnivores(int startNoCarnivores)</pre> </li> </ul> <a name="getStartNoHerbivores--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartNoHerbivores</h4> <pre>public int getStartNoHerbivores()</pre> </li> </ul> <a name="setStartNoHerbivores-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartNoHerbivores</h4> <pre>public void setStartNoHerbivores(int startNoHerbivores)</pre> </li> </ul> <a name="getStartEnergyCarnivores--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartEnergyCarnivores</h4> <pre>public int getStartEnergyCarnivores()</pre> </li> </ul> <a name="setStartEnergyCarnivores-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartEnergyCarnivores</h4> <pre>public void setStartEnergyCarnivores(int startEnergyCarnivores)</pre> </li> </ul> <a name="getStartEnergyHerbivores--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getStartEnergyHerbivores</h4> <pre>public int getStartEnergyHerbivores()</pre> </li> </ul> <a name="setStartEnergyHerbivores-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setStartEnergyHerbivores</h4> <pre>public void setStartEnergyHerbivores(int startEnergyHerbivores)</pre> </li> </ul> <a name="getHerbivoreCount--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHerbivoreCount</h4> <pre>public int getHerbivoreCount()</pre> </li> </ul> <a name="setHerbivoreCount-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setHerbivoreCount</h4> <pre>public void setHerbivoreCount(int herbivoreCounter)</pre> </li> </ul> <a name="getCarnivoreCount--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCarnivoreCount</h4> <pre>public int getCarnivoreCount()</pre> </li> </ul> <a name="setCarnivoreCount-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setCarnivoreCount</h4> <pre>public void setCarnivoreCount(int carnivoreCounter)</pre> </li> </ul> <a name="getAverageGrassDensity--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAverageGrassDensity</h4> <pre>public int getAverageGrassDensity()</pre> </li> </ul> <a name="setAverageGrassDensity-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAverageGrassDensity</h4> <pre>public void setAverageGrassDensity(int averageGrassDensity)</pre> </li> </ul> <a name="isRunning--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isRunning</h4> <pre>public boolean isRunning()</pre> </li> </ul> <a name="setRunning-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setRunning</h4> <pre>public void setRunning(boolean running)</pre> </li> </ul> <a name="getTurn--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getTurn</h4> <pre>public int getTurn()</pre> </li> </ul> <a name="incrementTurn--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>incrementTurn</h4> <pre>public void incrementTurn()</pre> <div class="block">Increment the turn variable by one.</div> </li> </ul> <a name="getNextID--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getNextID</h4> <pre>public int getNextID()</pre> <div class="block">Get the next unique animal ID number and increment the counter.</div> </li> </ul> <a name="incGeneration-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>incGeneration</h4> <pre>public void incGeneration(int n)</pre> <div class="block">Increment the generation counter as necessary.</div> </li> </ul> <a name="getGeneration--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getGeneration</h4> <pre>public int getGeneration()</pre> </li> </ul> <a name="setAnimals-java.util.ArrayList-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAnimals</h4> <pre>public void setAnimals(java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Integer>> animalInfo)</pre> </li> </ul> <a name="collectNews--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>collectNews</h4> <pre>public java.util.ArrayList<java.lang.String> collectNews()</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-all.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Ecologia</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../controller/OccupantType.html" title="enum in controller"><span class="typeNameLink">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../index.html?controller/World.html" target="_top">Frames</a></li> <li><a href="World.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>