
/**
 * Write a description of class Life here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */

public class Life {
    public static final int ROWS = 20;
    public static final int COLS = 80;
    public static final int TIME_DELAY = 500;

    /**
     * The intializeBoard static method sets up the initial board with a 
     * random set of cells.
     * @param board a Board, typically empty
     */


    /**
     * The static displayBoard method displays the board on screen. A Board
     * is a 2-dimensional int[][] array, so for the display to include other
     * characters--"." and "0", for example--characters will need to be printed
     * on the screen after checking the int value of that location.
     * @param board the board to be displayed
     */


    /**
     * The static calculateNextGeneration method takes the current board and 
     * a new (empty) board and calculates the next generation for that second
     * board based on the standard rules of Conway's Life:
     * 1. existing cell dies if fewer than 2 neighbors (underpopulation)
     * 2. existing cell lives if 2-3 neighbors ("these neighbors are JUST RIGHT!")
     * 3. existing cell dies if greater than 3 neighbors (overpopulation)
     * 4. empty cell becomes alive if exactly 3 neighbors (because...?)
     *
     * @param b the current board
     * @param nextB a board with the new generation on it
     */


    /**
     * The static method countNeighbors counts the eight cells around a given 
     * cell, making sure not to count outside of the bounds of the array and 
     * not to count the current cell itself!
     * @param row the row of the current cell
     * @param col the col of the current cell
     * @param b the board we're investigating
     * @return the number of non-zero neighbors (minimum 0, maximum 8)
     */


    /**
     * The static method transferNextToCurrent takes the board with the 
     * next generation and copies it to the board for this generation so 
     * that we can continue displaying and analyzing generations.
     * @param board the current board that we will copy to
     * @param nextBoard the next board containing a calculated new generation
     */


    /**
     * The clearConsole method attempts to clear the Terminal so that
     * successive generations of the board can be displayed
     */
    private static void clearConsole() {
        System.out.print("\033[H\033[2J");
        System.out.flush();
    }

    private static void slow(int TIME_DELAY) {
        // Sleep for some amount of time to slow display down
        try {
            Thread.sleep(TIME_DELAY);
            // TIME_DELAY is an integer in milliseconds
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
        }
    }

    public static void main(String[] args) {


    }
}
