Home > Back-end > Does greatly in text game as the main body to multiple small link should be how to do?
Does greatly in text game as the main body to multiple small link should be how to do?
Time:06-07
Does greatly In word games as the main body, to link up and how to implement multiple small game? (snake demining maze, etc.) When words in some case, for example, began to implement snake procedures, after the execution returns word game Whether the snake game as a whole function, screen clearing executive function when a case? Thank you greatly the patient answer ~ ~
CodePudding user response:
The independent snake game main function to change a name,
CodePudding user response:
Have a simple, inside the main loop of the game make decision into the judgment of the game (you can take the global variable control), then the game with its own main loop, stuck the main game of the main loop, and then wait for you to play enough change the variable a, exit the main loop of the game, son returned to the main game of the main loop