    public World step(Input input) {
        Env env = getEnv();
        Player player = getPlayer();
        boolean touchingFloor = env.isTouchingFloor(player);
        int ax = 0;
        int ay = 0;
        if (touchingFloor) {
            if (input.isJumpPressed()) {
                ay -= Player.JUMP;
            }
            if (input.isLeftPressed()) {
                ax -= 1;
            }
            if (input.isRightPressed()) {
                ax += 1;
            }
        }
        int vx;
        int vy = player.getVy() + ay*Player.VELOCITY_SCALE;
        if (IS_PERSON) {
            if (touchingFloor) {
                vx = 5*ax*Player.VELOCITY_SCALE;
            } else {
                vx = player.getVx();
            }
        } else {
            vx = player.getVx() + ax*Player.VELOCITY_SCALE;
        }
        if (touchingFloor) {
            if (!IS_PERSON) {
                vx -= Integer.signum(vx)*FRICTION;
            }
        } else {
            vy += GRAVITY;
        }
        int dx = (int) Math.round((double) vx/Player.VELOCITY_SCALE);
        int x = player.getX() + dx;
        int y = player.getY() + (int) Math.round((double) vy/Player.VELOCITY_SCALE);
        int angle = player.getAngle() - 360*dx/player.getCircumference();
        double radius = player.getRealRadius();
        int toyIndex = env.getToyIndex(player);
        if (toyIndex >= 0) {
            Toy toy = env.getToy(toyIndex);
            radius += 2.0*toy.getRadius()*toy.getRadius()/(radius*radius);
            env = env.withoutToy(toyIndex);
        }
        Integer pushBack = env.getPushBack(player, x, y, vx, vy);
        if (pushBack != null) {
            int dy = pushBack.intValue();
            y -= dy;
            if ((vy > 0) == (dy > 0)) {
                vy = 0;
            }
        }
        if (y > Env.HEIGHT) {
            x = Env.WIDTH/2;
            y = Env.HEIGHT/3;
            vx = 0;
            vy = 0;
        }
        Player newPlayer = new Player(x, y, angle, vx, vy, radius);
        return new World(env, newPlayer);
    }

    public World step(Input input) {
        Env env = getEnv();
        Player player = getPlayer();
        boolean touchingFloor = env.isTouchingFloor(player);
        int ax = 0;
        int ay = 0;
        if (touchingFloor) {
            if (input.isJumpPressed()) {
                ay -= Player.JUMP;
            }
            if (input.isLeftPressed()) {
                ax -= 1;
            }
            if (input.isRightPressed()) {
                ax += 1;
            }
        }
        int vx;
        int vy = player.getVy() + ay*Player.VELOCITY_SCALE;
        if (IS_PERSON) {
            if (touchingFloor) {
                vx = 3*ax*Player.VELOCITY_SCALE;
            } else {
                vx = player.getVx();
            }
        } else {
            vx = player.getVx() + ax*Player.VELOCITY_SCALE;
        }
        if (touchingFloor) {
            if (!IS_PERSON) {
                vx -= Integer.signum(vx)*FRICTION;
            }
        } else {
            vy += GRAVITY;
        }
        int dx = (int) Math.round((double) vx/Player.VELOCITY_SCALE);
        int x = player.getX() + dx;
        int y = player.getY() + (int) Math.round((double) vy/Player.VELOCITY_SCALE);
        int angle = player.getAngle() - 360*dx/player.getCircumference();
        double radius = player.getRealRadius();
        int toyIndex = env.getToyIndex(player);
        if (toyIndex >= 0) {
            Toy toy = env.getToy(toyIndex);
            radius += 2.0*toy.getRadius()*toy.getRadius()/(radius*radius);
            env = env.withoutToy(toyIndex);
        }
        Integer pushBack = env.getPushBack(player, x, y, vx, vy);
        if (pushBack != null) {
            int dy = pushBack.intValue();
            y -= dy;
            if ((vy > 0) == (dy > 0)) {
                vy = 0;
            }
        }
        if (y > Env.HEIGHT) {
            x = Env.WIDTH/2;
            y = Env.HEIGHT/3;
            vx = 0;
            vy = 0;
        }
        Player newPlayer = new Player(x, y, angle, vx, vy, radius);
        return new World(env, newPlayer);
    }
