When I hit escape to end the game, sometimes it will end the game right away, sometimes it takes many hits, and sometimes it never ends up ending the game. The code I have that causes the end of the game is as follows:
if window.checkKey() == 'Escape':
envelopes = gameOver
The envelopes part ends the loop of moving the envelopes. But this if statement is inside that while loop. Any suggestions would be great!