private void addActions() {
        this.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                UserInterface.AbstractInterface.Action act = null;
                if (square.hasMine())
                    act = factory.getAction("GameOver");
                else
                    act = factory.getAction("showField");
                if (act != null) act.execute(posX, posY);
            }
        });

        this.addMouseListener(new MouseListener() {
            private boolean pressed = false;

            @Override
            public void mouseClicked(MouseEvent e) {
            }

            @Override
            public void mousePressed(MouseEvent e) {
                pressed = true;
                UserInterface.AbstractInterface.Action act = factory.getAction("SquareViewerSelected");
                if (act != null) act.execute(0, 0);
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                pressed = false;
                UserInterface.AbstractInterface.Action act = factory.getAction("SquareViewerUnselected");
                if (act != null) act.execute(0, 0);
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                UserInterface.AbstractInterface.Action act = null;
                if (pressed) act = factory.getAction("SquareViewerSelected");
                if (act != null) act.execute(0, 0);
            }

            @Override
            public void mouseExited(MouseEvent e) {
                UserInterface.AbstractInterface.Action act = factory.getAction("SquareViewerUnselected");
                if (act != null) act.execute(0, 0);
            }
        });
    }