Making of LLemMings

I think this is mostly human cheating :(

ChatGPT: ...


>>> Prompt: Modification of a previous prompt
...
obstacle on the x axis it should turn around and walk the other way. The ground can be a bit hilly,
so there should be some fuzziness in the collision check so that it only stops when it runs into a
real wall. If it falls into something on the y axis it should stop moving on the Y axis and start
walking on the x axis. If it falls into the water, the lemming is dead. Updates should be done
every frame. There will eventually be many lemmings, so do note that they are not controlled by
keys, they move by themselves and is constrained by the collision rules outlined above.

It is important that you use the declared things I mentioned above and just give me the code with
minor comments, no need to explain anything in plain text.