I have my game running in a while True loop and I would like to be able to ask the user to "Play again?" I already have the code for a rect to pop up with the text but I need a way for the user to click on the rect or hit y for yes and the code run its self again.
Have the loop it's own method, call it from a main() run, when the game is over and ends, have main() ask the user if they want to play again, and if so recall the main loop after setting everything as its default
or
Just have the part that asks again clear and reinitialize all variables as there defaults and let the loop  if the user wants to play again
Pygame restart?