import java.util.Scanner; public class GoLHW2 { public static void main(String[] args) { Creature[][] board = initBoard(10,10); printBoard(board); play(board); } public static void printBoard(LifeForm[][] b) { for(Creature[] row : b) { for(Creature creature : row) System.out.print(" "+creature); System.out.println(); } } public static Creature[][] initBoard(int x, int nCreatures) { // Initialize (Create) an x*x board of empty Creature objects. // Randomly place DOP and PODs on the board (using "new") and // making sure you get approximately nCreature number of DOPs and nCreature number of PODs } public static void play(Creature[][] board) { Scanner kb = new Scanner(System.in); while(!kb.nextLine().contains("q")) { // go through the board once and call the "act" method // on the life forms that are not null printBoard(board); } } }