/** * Private method that prints the current ecosystem grid as a string * * @return the string printout */ private String printX() { String s = ""; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { Item x = system.getItemAt(new Cell(i, j)); if (x != null) s += x.getSymbol(); else s += "x"; } return s; }