From 0867c5bd050542cacf8d89250f5adbef1bc840b7 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Thu, 28 May 2026 00:59:07 -0400 Subject: [PATCH] refactor(card): rename TryParseDestructDict to TryParseCardCountDict --- SVSim.EmulatedEntrypoint/Controllers/CardController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SVSim.EmulatedEntrypoint/Controllers/CardController.cs b/SVSim.EmulatedEntrypoint/Controllers/CardController.cs index b825e4a..8ac472a 100644 --- a/SVSim.EmulatedEntrypoint/Controllers/CardController.cs +++ b/SVSim.EmulatedEntrypoint/Controllers/CardController.cs @@ -28,7 +28,7 @@ public class CardController : SVSimController { if (!TryGetViewerId(out long viewerId)) return Unauthorized(); - if (!TryParseDestructDict(request.CardIdNumberArray, out var destructCounts, out var snapshots, out var parseError)) + if (!TryParseCardCountDict(request.CardIdNumberArray, out var destructCounts, out var snapshots, out var parseError)) return BadRequest(new { error = parseError }); if (destructCounts.Count == 0) @@ -83,13 +83,13 @@ public class CardController : SVSimController /// "<num_to_destruct>,<client_possession_snapshot>" — both strings. /// Returns false (and sets ) on any structural problem. /// - private static bool TryParseDestructDict( + private static bool TryParseCardCountDict( string raw, - out Dictionary destructCounts, + out Dictionary counts, out Dictionary clientSnapshots, out string errorKey) { - destructCounts = new(); + counts = new(); clientSnapshots = new(); errorKey = "malformed_request"; @@ -120,7 +120,7 @@ public class CardController : SVSimController if (!int.TryParse(pair[1], out int snapshot) || snapshot < 0) return false; - destructCounts[cardId] = num; + counts[cardId] = num; clientSnapshots[cardId] = snapshot; } }