@Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource().equals(aiTimer)) {
            if (ballMovement) {
                updateStatus();
                updateRemote();
                moveBall();
                repaint();
            }
        } else if (e.getSource().equals(playerTimer)) {
            repaint();
            ballMovement = true;
            playerTimer.stop();
            aiTimer.start();
        }
    }