src/main/java/com/brianscottrussell/gameoflife/GameGrid.java
/**
     * Given the grid coordinates indicated by row & col:
     *  checks the adjacent cells to count how many are alive
     *  this takes into account that the given coordinate might be at the edge of the grid
     *
     * @param row int
     * @param col int
     * @return int as count of living neighbors
     */
Given the grid coordinates indicated by row & col:
checks the adjacent cells to count how many are alive
this takes into account that the given coordinate might be at the edge of the grid

@param row int
@param col int
@return int as count of living neighbors
Given the grid coordinates indicated by row & col : checks the adjacent cells to count how many are alive this takes into account that the given coordinate might be at the edge of the grid @param row int @param col int @return int as count of living neighbors
private int countLivingNeighbors(int row, int col) {
        int livingNeighborCount = 0;
        /**
         * Checks if the upper left cell is alive (O = current cell, # = cell to check)
             #xx
             xOx
             xxx
        */
        if(isCellInGrid(row - 1, col - 1) && isCellAlive(row - 1, col - 1)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the upper cell is alive (O = current cell, # = cell to check)
             x#x
             xOx
             xxx
        */
        if(isCellInGrid(row - 1, col) && isCellAlive(row - 1, col)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the upper right cell is alive (O = current cell, # = cell to check)
             xx#
             xOx
             xxx
        */
        if(isCellInGrid(row - 1, col + 1) && isCellAlive(row - 1, col + 1)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the left cell is alive (O = current cell, # = cell to check)
             xxx
             #Ox
             xxx
        */
        if(isCellInGrid(row, col - 1) && isCellAlive(row, col - 1)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the right cell is alive (O = current cell, # = cell to check)
             xxx
             xO#
             xxx
        */
        if(isCellInGrid(row, col + 1) && isCellAlive(row, col + 1)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the lower left cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             #xx
        */
        if(isCellInGrid(row + 1, col - 1) && isCellAlive(row + 1, col - 1)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the lower cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             x#x
        */
        if(isCellInGrid(row + 1, col) && isCellAlive(row + 1, col)) {
            livingNeighborCount++;
        }
        /**
         * Checks if the lower right cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             xx#
        */
        if(isCellInGrid(row + 1, col + 1) && isCellAlive(row + 1, col + 1)) {
            livingNeighborCount++;
        }
        return livingNeighborCount;
    }
private int countLivingNeighbors ( int row , int col ) { int livingNeighborCount = 0 ; /**
         * Checks if the upper left cell is alive (O = current cell, # = cell to check)
             #xx
             xOx
             xxx
        */ if ( isCellInGrid ( row - 1 , col - 1 ) && isCellAlive ( row - 1 , col - 1 ) ) { livingNeighborCount ++ ; } /**
         * Checks if the upper cell is alive (O = current cell, # = cell to check)
             x#x
             xOx
             xxx
        */ if ( isCellInGrid ( row - 1 , col ) && isCellAlive ( row - 1 , col ) ) { livingNeighborCount ++ ; } /**
         * Checks if the upper right cell is alive (O = current cell, # = cell to check)
             xx#
             xOx
             xxx
        */ if ( isCellInGrid ( row - 1 , col + 1 ) && isCellAlive ( row - 1 , col + 1 ) ) { livingNeighborCount ++ ; } /**
         * Checks if the left cell is alive (O = current cell, # = cell to check)
             xxx
             #Ox
             xxx
        */ if ( isCellInGrid ( row , col - 1 ) && isCellAlive ( row , col - 1 ) ) { livingNeighborCount ++ ; } /**
         * Checks if the right cell is alive (O = current cell, # = cell to check)
             xxx
             xO#
             xxx
        */ if ( isCellInGrid ( row , col + 1 ) && isCellAlive ( row , col + 1 ) ) { livingNeighborCount ++ ; } /**
         * Checks if the lower left cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             #xx
        */ if ( isCellInGrid ( row + 1 , col - 1 ) && isCellAlive ( row + 1 , col - 1 ) ) { livingNeighborCount ++ ; } /**
         * Checks if the lower cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             x#x
        */ if ( isCellInGrid ( row + 1 , col ) && isCellAlive ( row + 1 , col ) ) { livingNeighborCount ++ ; } /**
         * Checks if the lower right cell is alive (O = current cell, # = cell to check)
             xxx
             xOx
             xx#
        */ if ( isCellInGrid ( row + 1 , col + 1 ) && isCellAlive ( row + 1 , col + 1 ) ) { livingNeighborCount ++ ; } return livingNeighborCount ; }
Given the grid coordinates indicated by row & col:
  checks the adjacent cells to count how many are alive
  this takes into account that the given coordinate might be at the edge of the grid
Given the grid coordinates indicated by row & col : checks the adjacent cells to count how many are alive this takes into account that the given coordinate might be at the edge of the grid