/**
     * This method handle the keyboard input of the player.
     * It handles keeper moves.
     * @param code
     * @throws IOException
     * @throws ClassNotFoundException
     */
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:
// 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:
// 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:
// TODO: implement something funny.
}
if (isDebugActive()) {
System.out.println(code);
}
}