Your explanation is clear, making it easy for even a newbie to Python to understand the code but to be honest, they went over my head as I'm far far away from Python after I gave HTML a try long ago which seemed like a disaster.
I appreciate your dedication to the Splinterlands community and your willingness to help others. This sense of community is what makes blockchain platforms like Hive so special.
Understanding some of it is a start. It needs to be broken down into parts like everything else.
I would like to see more open source code relating to HIVE, this is the idea.