diff --git a/MemoryGame/Services/GameService.cs b/MemoryGame/Services/GameService.cs index 2d06071..c5aacb6 100644 --- a/MemoryGame/Services/GameService.cs +++ b/MemoryGame/Services/GameService.cs @@ -165,4 +165,18 @@ public sealed class GameService { return _statistics?.Words ?? []; } + + public async Task ResetStatisticsAsync() + { + if (_statistics == null) + return; + + foreach (var word in _statistics.Words) + { + word.CorrectCount = 0; + word.IncorrectCount = 0; + } + + await _localStorage.SaveStatisticsAsync(_statistics); + } }