public void move(int key) {
        Position p = new Position(position.x, position.y);

        switch (key) {
            case KeyEvent.VK_UP:
                currentOrientation = PLAYER_ORIENTATION.UP;
                p.y -= speed;
                break;
            case KeyEvent.VK_RIGHT:
                currentOrientation = PLAYER_ORIENTATION.RIGHT;
                p.x += speed;
                break;
            case KeyEvent.VK_DOWN:
                currentOrientation = PLAYER_ORIENTATION.DOWN;
                p.y += speed;
                break;
            case KeyEvent.VK_LEFT:
                currentOrientation = PLAYER_ORIENTATION.LEFT;
                p.x -= speed;
                break;
        }

        if (MainPanel.isPossibleMove(this, p)) {
            position = p;
        }
    }