Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
shuo committed Jun 20, 2024
1 parent 30ce96f commit e8962c7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ public Task<object> 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;

Expand Down Expand Up @@ -373,6 +375,7 @@ public Task<RequestHintOrGiveUpResult> 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);
Expand Down

0 comments on commit e8962c7

Please sign in to comment.