递归调用play+修改窗口大小+添加文字说明#47
Open
Yimi22 wants to merge 3 commits into
Open
Conversation
Owner
|
Windows10环境没观察到MoveWindow后有变化,能否提供一个截图看看效果? |
Owner
|
另外,游戏结束时只调用play()是没法重开一局的,需要重新生成场景。可以在游戏结束时提供选项,让玩家选择重开还是退出。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我注意到我们的数独游戏在默认控制台窗口中的显示区域相对较小,因此,我通过调用 SetConsoleWindowSize 函数调整了控制台窗口的大小,确保游戏区域的占比更合理。我还在数独游戏的逻辑控制部分中将exit函数改为一个递归调用,这样玩家在完成一个数独九宫格后不会直接退出游戏,不管是失败还是成功,都可以选择继续下一轮。此外,我还在正式游戏之前添加了游戏操作的相关提示,这一系列修改提升了用户的体验。