mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-05-10 02:19:46 +08:00
重构输入处理:统一使用get_integer_input函数替换scanf
This commit is contained in:
@@ -289,10 +289,8 @@ void display_game_scores(int game_mode)
|
||||
*/
|
||||
void handle_save_record(int game_mode)
|
||||
{
|
||||
int save_choice = 0;
|
||||
printf("===== 游戏结束 =====\n");
|
||||
printf("是否保存游戏记录? (1-是, 0-否): ");
|
||||
scanf("%d", &save_choice);
|
||||
int save_choice = get_integer_input("是否保存游戏记录? (1-是, 0-否): ", 0, 1);
|
||||
|
||||
if (save_choice == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user