Skip to content

Commit

Permalink
用过提示只加100分
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyhhssyy committed Jun 21, 2024
1 parent 7ed42e1 commit 7448f08
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,20 @@ public Task<object> HandleMove(Game rawGame, string playerId, string move)
answer.Completed = true;
answer.AnswerTime = DateTime.Now;
answer.PlayerId = playerId;


var score = 200;
if (answer.HintLevel > 0)
{
score = 100;
}

if (game.PlayerScore.ContainsKey(playerId))
{
game.PlayerScore[playerId] += 200;
game.PlayerScore[playerId] += score;
}
else
{
game.PlayerScore.TryAdd(playerId, 200);
game.PlayerScore.TryAdd(playerId, score);
}

game.PlayerMoveList.Add(new PlayerMove()
Expand Down

0 comments on commit 7448f08

Please sign in to comment.