@Override
        public void keyTyped(KeyEvent e) {
            keys[e.getKeyCode()] = true;
            if (e.getKeyChar() == (char)27) {
                aiTimer.stop();
                if (JOptionPane.showConfirmDialog(null, "Juego en progreso\n" +
                                "Desea continuar jugando?", "Pausa",
                        JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
                    aiTimer.start();
                else {
                    parent.dispose();
                    System.exit(0);
                }
            }
        }