public void shift(Direction direction, int i) {
        switch (direction) {
            case UP:
                y -= i;
                break;
            case DOWN:
                y += i;
                break;
            case LEFT:
                x -= i;
                break;
            case RIGHT:
                x += i;
                break;
        }
    }