I believe I have located what is causing the lag. The `Soldier` and `Shadow` classes are being instantiated inside of the `draw_window` function.
# line 73 of main.py def draw_window(): for i in range(0, 31): window.blit(tile1, (tilepos[i])) sold1 = Soldier(0, Soldier_positions[0])
This is a large memory allocation to occur on every single frame, so ideally, it could be moved to where you are assigning the lists of positions `Soldier_positions` and `shadow_positions`. Then, the necessary code from those constructors could be moved into the `draw_window` function directly.
After making these changes locally, this is how the game runs on my machine: