First thing first im really new to this thing called C++ and coding in general so my understanding on it its very little, but i guess the Main() function is where the basic foundation of the game was written, means what we wanted the game to be or what it looks like
1 Like
Hi and welcome to the community.
Basically you’ve got it. In a C++ Program, any code in main is executed first.
I hope you enjoy the course. Good luck!
It looks like it initializes a starting difficulty, and a maximum difficulty. We play the game inside the while loop and it acts as a control statement to play until we have reached the max level. Every time we play the game, the loop checks to see if the return value of PlayGame
is true, and if so, we increment the level difficulty. This happens until we exceed the maximum difficulty. If we exceed the maximum difficulty, we have “beaten the game”!