void game_step()

in procgen/src/games/climber.cpp [290:318]


    void game_step() override {
        BasicAbstractGame::game_step();

        if (action_vx > 0)
            agent->is_reflected = false;
        if (action_vx < 0)
            agent->is_reflected = true;

        for (int i = (int)(entities.size()) - 1; i >= 0; i--) {
            auto ent = entities[i];

            if (ent->type == ENEMY) {
                if (ent->x > ent->climber_spawn_x + PATROL_RANGE) {
                    ent->vx = -1 * fabs(ent->vx);
                } else if (ent->x < ent->climber_spawn_x - PATROL_RANGE) {
                    ent->vx = fabs(ent->vx);
                }

                ent->image_type = cur_time / 5 % 2 == 0 ? ENEMY1 : ENEMY2;
                ent->is_reflected = ent->vx < 0;
            }
        }

        if (coin_quota == coins_collected) {
            step_data.done = true;
            step_data.reward += COMPLETION_BONUS;
            step_data.level_complete = true;
        }
    }