extracted Range record to its own file

This commit is contained in:
2025-12-05 11:46:35 -05:00
parent 497bdd7a3b
commit 842e9be900
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Range = AdventOfCode2025.Utils.Range;
namespace AdventOfCode2025; namespace AdventOfCode2025;
@@ -43,6 +44,4 @@ public class GiftShop : IAdventSolution
var numbers = input.Split('-', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries); var numbers = input.Split('-', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
return new Range(ulong.Parse(numbers[0]), ulong.Parse(numbers[^1])); return new Range(ulong.Parse(numbers[0]), ulong.Parse(numbers[^1]));
} }
} }
public record struct Range(ulong Min, ulong Max);

View File

@@ -0,0 +1,3 @@
namespace AdventOfCode2025.Utils;
public record struct Range(ulong Min, ulong Max);