What I think Main Does

Main,

sets some default values for difficulty and max difficulty
while difficulty is less than the max:
Play the game
clear out some stuff from the input buffers
increment the difficulty so eventually the while loop can end

show an congratulatory message to the player
exit the program with no error

Privacy & Terms