public Percolation(int N) {
        gridSize=N;
        grid = new int[N * N];

        for (int i = 1; i <= N; i++) {
            for (int j = 1; j <= N; j++) {
                grid[i * j] = BLOCKED;
            }
        }
    }