Update comment in GameDataService.cs

This commit is contained in:
Hipposgrumm 2025-09-16 10:11:28 -06:00 committed by GitHub
parent 900bdbb73d
commit b112bc6afd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,8 +171,8 @@ public class GameDataService {
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) {