public void handleKey(KeyCode code) throws IOException, ClassNotFoundException {
        switch (code) {
            case UP:
                move(new Point(-1, 0),"");
                break;
            case RIGHT:
                move(new Point(0, 1),"");
                break;
            case DOWN:
                move(new Point(1, 0),"");
                break;
            case LEFT:
                move(new Point(0, -1),"");
                break;
            default:
                // TODO: implement something funny.
        }
        if (isDebugActive()) {
            System.out.println(code);
        }
    }
public void handleKey(KeyCode code) throws IOException, ClassNotFoundException {
        switch (code) {
            case UP:
                move(new Point(-1, 0),"");
                break;
            case RIGHT:
                move(new Point(0, 1),"");
                break;
            case DOWN:
                move(new Point(1, 0),"");
                break;
            case LEFT:
                move(new Point(0, -1),"");
                break;
            default:
               
        }
        if (isDebugActive()) {
            System.out.println(code);
        }
    }
public void handlekey(keycode code) throws ioexception, classnotfoundexception { switch (code) { case up: move(new point(-1, 0),""); break; case right: move(new point(0, 1),""); break; case down: move(new point(1, 0),""); break; case left: move(new point(0, -1),""); break; default: } if (isdebugactive()) { system.out.println(code); } }