Events occur every time the player moves the mouse or presses or releases a key. In this case, we are only interested in aQUIT event, which is caused by someone clicking the window close icon in the top-right corner of the game window. We could chose not to exit immediately here, but rather prompt the player to see whether they indeed want to exit. The next line clears the screen by filling it with the color white.