@Override
    public void keyPressed(KeyEvent ke) {
         if (isWin==false) {
                switch (ke.getKeyCode()) {
                    case KeyEvent.VK_LEFT:
                        left();
                        break;
                    case KeyEvent.VK_DOWN:
                        down();
                        break;
                    case KeyEvent.VK_UP:
                        up();
                        break;
                    case KeyEvent.VK_RIGHT:
                        right();
                        break;
                }
        }
    }