public Container(int width, int height, Minesweeper game) {

        sections = new ArrayList<>();
        heart = new ImageIcon(getClass().getResource("heart-icon.png")).getImage();


        for (int x = 0; x < width; x++) {
            for (int y = 0; y < height; y++) {
                sections.add(new Section(x, y, game));
            }
        }

        addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                super.mouseClicked(e);
                for (Section section : sections) {
                    if (section.contains(e.getPoint())) {
                        section.open(sections, true);
                        repaint();
                    }
                }
            }
        });

    }