what is the best way to use loops to detect events while the main loop is running?
- by yao jiang
I am making an "game" that has pathfinding using pygame. I am using Astar algo.
I have a main loop which draws the whole map. In the loop I check for events. If user press "enter" or "space", random start and end are selected, then animation starts and it will try to get from start to end.
My draw function is stupid as hell right now, it works…