private int neighborhood(int i, int j)
    {
        int live_neighbors = 0;
        for(int x_offset=-1; x_offset<=1; x_offset++)
            {
                for(int y_offset=-1; y_offset<=1; y_offset++)
                    {
                        if((board[modulo(i+x_offset, rows)][modulo(j+y_offset, cols)] == State.ALIVE) && (x_offset != 0 || y_offset != 0))
                            live_neighbors++;
                    }
            }
        return live_neighbors;
    }