From b112bc6afd32d5c1d205643454a02e908bd62e17 Mon Sep 17 00:00:00 2001 From: Hipposgrumm <60556345+Hipposgrumm@users.noreply.github.com> Date: Tue, 16 Sep 2025 10:11:28 -0600 Subject: [PATCH] Update comment in GameDataService.cs --- src/Services/GameDataService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/GameDataService.cs b/src/Services/GameDataService.cs index 2faa29a..06c2128 100644 --- a/src/Services/GameDataService.cs +++ b/src/Services/GameDataService.cs @@ -170,9 +170,9 @@ public class GameDataService { private void SavePairs(Model.GameData gameData, string xmlDocumentData) { foreach (var pair in GetGameDataPairs(xmlDocumentData)) { GameDataPair? dbPair = gameData.GameDataPairs.FirstOrDefault(x => x.Name == pair.Name); - - // If Name == "time" then (existing <= incoming) needs to be false (effectively (existing > incoming), as time should function). - // if Name is anything else, then second condition as normal. + + // If the score type is "time", use newBest <= existing (newest time is smaller than (or the same as) existing time). + // For anything else, use newBest > existing (newest score is larger than existing score). bool newBest = (dbPair == null) || ((pair.Name == "time") != (dbPair.Value <= pair.Value)); if (dbPair == null) {