User manual

71
Fig. 8.3: Six possible dice scores.
The loop restarts immediately and waits for the user’s keystroke. If, however, mainloop is set to False
during the loop because the user wants to quit the game, the loop will not rerun and the following line is
executed:
pygame.quit() This line terminates the PyGame module and closes the graphical window and then the
whole programme.