<p>IN the MB simulation how is the order the fish move determined with darter, slow, and fish?</p>
<p>if i understand what you’re saying…
darter: move 2 spaces forward if possible, otherwise regular move. if it cannot move (forward space blocked), then it reverses direction.</p>
<p>slow: 1/5 chance of no move, otherwise regular move</p>
<p>If you’re talking about in which order the fish move (their act methods are called), there are two different scenarios: </p>
<p>In a bounded environment the fish move in “row-major” order. Starting in the upper left corner and going across.</p>
<p>[1][2][3]
[4][5][6]
[7][8][9]</p>
<p>The fish would act 1 - 9.</p>
<p>In an unbounded environment the fish would act in the order in which they are in the ArrayList which contains the objects, since the Simulation’s step method iterates through this in order. Note: unless you manually add fish to the environment using the ArrayList method add(int, Object) then the fish will act in the order in which they were added to the environment.</p>