diff --git a/com/laboon/Cell.java b/com/laboon/Cell.java index 1e0eab8..94a1db9 100644 --- a/com/laboon/Cell.java +++ b/com/laboon/Cell.java @@ -67,16 +67,16 @@ public State iterate(int numNeighbors) { * @return Character representation of the cell's state */ - public char getStateRep() { - char toReturn = ' '; - if (_state == State.DEAD) { - toReturn = '.'; - } else if (_state == State.ALIVE) { - toReturn = '*'; - } else { - toReturn = ' '; - } - return toReturn; + public char getStateRep() { + char toReturn = ' '; + if (_state == State.DEAD) { + toReturn = ' '; + } else if (_state == State.ALIVE) { + toReturn = '*'; + } else { + toReturn = ' '; + } + return toReturn; } /** diff --git a/com/laboon/JavaLife.java b/com/laboon/JavaLife.java index ed55c86..c09ffc5 100644 --- a/com/laboon/JavaLife.java +++ b/com/laboon/JavaLife.java @@ -2,26 +2,26 @@ public class JavaLife { - /** - * This is the main part. - * - * @param size Size of world - * @param seed Random number seed - * @param percent Percent of cells alive at beginning - * @param maxIterations Maximum number of iterations - */ + + /** + * + * @param size Size of a world + * @param seed Random number seed for RNG + * @param percent Percent of cells alive at beginning + * @param maxIterations Maximum number of iterations + */ - public JavaLife(int size, int seed, int percent, int maxIterations) { - World w = new World(size, seed, percent); - System.out.println("Initial Configuration:"); - System.out.println(w.toString()); - for (int j=0; j < maxIterations; j++) { - w = w.iterate(); - System.out.println("Iteration " + (j + 1) + ":"); - System.out.println(w.toString()); - } + public JavaLife(int size, int seed, int percent, int maxIterations) { + World w = new World(size, seed, percent); + System.out.println("Initial Configuration:"); + System.out.println( w.toString() ); + for (int j=0; j < maxIterations; j++) { + w = w.iterate(); + System.out.println("Iteration " + (j + 1) + ":"); + System.out.println(w.toString()); + } - } + } /** * String to display if wrong number of arguments or other unspecified error