public boolean isConnectedToCapital(int x, int y, Player player) {
        boolean[][] searched = new boolean[width][height];
        for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
                searched[i][j] = false;
            }
        }
        return isConnectedToCapital(x, y, player, searched, true);
    }