moved the declaration of a variable

This commit is contained in:
hneemann 2017-12-14 16:52:55 +01:00
parent 632d8910c6
commit a488b6cc40

View File

@ -219,8 +219,8 @@ public class Model implements Iterable<Node> {
* @throws NodeException NodeException * @throws NodeException NodeException
*/ */
public void doStep(boolean noise) throws NodeException { public void doStep(boolean noise) throws NodeException {
int counter = 0;
if (needsUpdate()) { if (needsUpdate()) {
int counter = 0;
while (needsUpdate()) { while (needsUpdate()) {
if (counter++ > MAX_LOOP_COUNTER) { if (counter++ > MAX_LOOP_COUNTER) {
if (oscillatingNodes == null) if (oscillatingNodes == null)
@ -237,7 +237,6 @@ public class Model implements Iterable<Node> {
} }
} else } else
fireEvent(ModelEvent.STEP); fireEvent(ModelEvent.STEP);
} }
/** /**