extracted Range record to its own file
This commit is contained in:
@@ -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);
|
|
||||||
3
AdventOfCode2025/Utils/Range.cs
Normal file
3
AdventOfCode2025/Utils/Range.cs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
namespace AdventOfCode2025.Utils;
|
||||||
|
|
||||||
|
public record struct Range(ulong Min, ulong Max);
|
||||||
Reference in New Issue
Block a user