From e8962c736fe435b00ceebdbc9bb465997d5809fa Mon Sep 17 00:00:00 2001 From: shuo Date: Thu, 20 Jun 2024 13:43:52 +0800 Subject: [PATCH] 1 --- .../GameLogic/SkinGuess/SkinGuessManager.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AmiyaBotPlayerRatingServer/GameLogic/SkinGuess/SkinGuessManager.cs b/AmiyaBotPlayerRatingServer/GameLogic/SkinGuess/SkinGuessManager.cs index 7f5db3c..f398d46 100644 --- a/AmiyaBotPlayerRatingServer/GameLogic/SkinGuess/SkinGuessManager.cs +++ b/AmiyaBotPlayerRatingServer/GameLogic/SkinGuess/SkinGuessManager.cs @@ -272,6 +272,8 @@ public Task HandleMove(Game rawGame, string playerId, string move) if (game.CurrentQuestionIndex >= game.QuestionList.Count) { + game.CurrentQuestionIndex = game.QuestionList.Count - 1; + game.IsCompleted = true; game.CompleteTime = DateTime.Now; @@ -373,6 +375,7 @@ public Task GiveUp(Game rawGame, string appUserId) game.CurrentQuestionIndex++; if (game.CurrentQuestionIndex >= game.QuestionList.Count) { + game.CurrentQuestionIndex = game.QuestionList.Count - 1; game.IsCompleted = true; game.CompleteTime = DateTime.Now; manager.CreateStatistics(game);