From b73e58879ad852fc90ce5b2a7e621cefbcd0f57a Mon Sep 17 00:00:00 2001
From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com>
Date: Sun, 3 Dec 2023 23:14:53 -0600
Subject: [PATCH 1/6] chore: scaffold for day 4 puzzle
---
04/Scratchcards.Tests/GlobalUsings.cs | 1 +
.../Scratchcards.Tests.csproj | 30 +++++++++++++++++++
04/Scratchcards.Tests/UnitTest1.cs | 10 +++++++
04/Scratchcards/Program.cs | 2 ++
04/Scratchcards/Scratchcards.csproj | 10 +++++++
AdventOfCode2023.sln | 16 ++++++++++
6 files changed, 69 insertions(+)
create mode 100644 04/Scratchcards.Tests/GlobalUsings.cs
create mode 100644 04/Scratchcards.Tests/Scratchcards.Tests.csproj
create mode 100644 04/Scratchcards.Tests/UnitTest1.cs
create mode 100644 04/Scratchcards/Program.cs
create mode 100644 04/Scratchcards/Scratchcards.csproj
diff --git a/04/Scratchcards.Tests/GlobalUsings.cs b/04/Scratchcards.Tests/GlobalUsings.cs
new file mode 100644
index 0000000..8c927eb
--- /dev/null
+++ b/04/Scratchcards.Tests/GlobalUsings.cs
@@ -0,0 +1 @@
+global using Xunit;
\ No newline at end of file
diff --git a/04/Scratchcards.Tests/Scratchcards.Tests.csproj b/04/Scratchcards.Tests/Scratchcards.Tests.csproj
new file mode 100644
index 0000000..6793136
--- /dev/null
+++ b/04/Scratchcards.Tests/Scratchcards.Tests.csproj
@@ -0,0 +1,30 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+ false
+ true
+
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
diff --git a/04/Scratchcards.Tests/UnitTest1.cs b/04/Scratchcards.Tests/UnitTest1.cs
new file mode 100644
index 0000000..822f43f
--- /dev/null
+++ b/04/Scratchcards.Tests/UnitTest1.cs
@@ -0,0 +1,10 @@
+namespace Scratchcards.Tests;
+
+public class UnitTest1
+{
+ [Fact]
+ public void Test1()
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/04/Scratchcards/Program.cs b/04/Scratchcards/Program.cs
new file mode 100644
index 0000000..3751555
--- /dev/null
+++ b/04/Scratchcards/Program.cs
@@ -0,0 +1,2 @@
+// See https://aka.ms/new-console-template for more information
+Console.WriteLine("Hello, World!");
diff --git a/04/Scratchcards/Scratchcards.csproj b/04/Scratchcards/Scratchcards.csproj
new file mode 100644
index 0000000..2150e37
--- /dev/null
+++ b/04/Scratchcards/Scratchcards.csproj
@@ -0,0 +1,10 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
diff --git a/AdventOfCode2023.sln b/AdventOfCode2023.sln
index 0d08297..3e793ae 100644
--- a/AdventOfCode2023.sln
+++ b/AdventOfCode2023.sln
@@ -21,6 +21,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GearRatios", "03\GearRatios
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GearRatios.Tests", "03\GearRatios.Tests\GearRatios.Tests.csproj", "{FEE9253C-A56B-4735-BDB3-C62220C5B1B1}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04", "04", "{522D6D1E-54AD-4479-BB78-0AB5D7493EFC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scratchcards", "04\Scratchcards\Scratchcards.csproj", "{B58CF14B-97A1-45F6-967F-29FA82DAFD0F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scratchcards.Tests", "04\Scratchcards.Tests\Scratchcards.Tests.csproj", "{FF8A5512-85FD-45E7-9F97-EC528465949C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -54,6 +60,14 @@ Global
{FEE9253C-A56B-4735-BDB3-C62220C5B1B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEE9253C-A56B-4735-BDB3-C62220C5B1B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEE9253C-A56B-4735-BDB3-C62220C5B1B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B58CF14B-97A1-45F6-967F-29FA82DAFD0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B58CF14B-97A1-45F6-967F-29FA82DAFD0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B58CF14B-97A1-45F6-967F-29FA82DAFD0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B58CF14B-97A1-45F6-967F-29FA82DAFD0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FF8A5512-85FD-45E7-9F97-EC528465949C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FF8A5512-85FD-45E7-9F97-EC528465949C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FF8A5512-85FD-45E7-9F97-EC528465949C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FF8A5512-85FD-45E7-9F97-EC528465949C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3F8EAC09-4BC7-43AA-B72B-48DDD2710F6D} = {8C29858C-623A-461A-BF0B-254E151CD9C2}
@@ -62,5 +76,7 @@ Global
{4825CE42-4717-4DA6-944F-9BD9A825932B} = {4FD81B09-302F-4C76-BECB-B4559DF3984F}
{F697AC19-C92D-4E2A-975A-1A16A1961133} = {EA04152D-316A-4AA4-9BC1-57F6A9F3CD4E}
{FEE9253C-A56B-4735-BDB3-C62220C5B1B1} = {EA04152D-316A-4AA4-9BC1-57F6A9F3CD4E}
+ {B58CF14B-97A1-45F6-967F-29FA82DAFD0F} = {522D6D1E-54AD-4479-BB78-0AB5D7493EFC}
+ {FF8A5512-85FD-45E7-9F97-EC528465949C} = {522D6D1E-54AD-4479-BB78-0AB5D7493EFC}
EndGlobalSection
EndGlobal
From e3f5aeaa97b6af55a33a3e6e700d57041748b5e4 Mon Sep 17 00:00:00 2001
From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com>
Date: Sun, 3 Dec 2023 23:18:05 -0600
Subject: [PATCH 2/6] docs: update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f44df71..c62875b 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ dotnet run -- part2
| 01 | [Problem](./01/PROBLEM.md) | [Solution](./01/Trebuchet/) | ✅ | The trickiest part here was accounting for overlapping digit words. |
| 02 | [Problem](./02/PROBLEM.md) | [Solution](./02/CubeConundrum/) | ✅ | The key to me here was to parse the input into a useful model. |
| 03 | [Problem](./03/PROBLEM.md) | [Solution](./03/GearRatios/) | ✅ | The edge case that got me here was lines ending with a part number. |
-| 04 | [Problem](./04/PROBLEM.md) | [Solution](./04/) | ⌛ |
+| 04 | [Problem](./04/PROBLEM.md) | [Solution](./04/Scratchcards/) | ⌛ |
| 05 | [Problem](./05/PROBLEM.md) | [Solution](./05/) | ⌛ |
| 06 | [Problem](./06/PROBLEM.md) | [Solution](./06/) | ⌛ |
| 07 | [Problem](./07/PROBLEM.md) | [Solution](./07/) | ⌛ |
From d50b7c75cae9aac4c9263ce7f2927981b59eca9e Mon Sep 17 00:00:00 2001
From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com>
Date: Sun, 3 Dec 2023 23:22:44 -0600
Subject: [PATCH 3/6] tests: add tests for GearRatios challenge for actual
puzzle input
---
03/GearRatios.Tests/GearRatios.Tests.csproj | 6 ++++++
03/GearRatios.Tests/PuzzleSolverTests.cs | 12 ++++++++++++
2 files changed, 18 insertions(+)
diff --git a/03/GearRatios.Tests/GearRatios.Tests.csproj b/03/GearRatios.Tests/GearRatios.Tests.csproj
index d3b6c47..e0d4aab 100644
--- a/03/GearRatios.Tests/GearRatios.Tests.csproj
+++ b/03/GearRatios.Tests/GearRatios.Tests.csproj
@@ -27,4 +27,10 @@
+
+
+ PreserveNewest
+
+
+
diff --git a/03/GearRatios.Tests/PuzzleSolverTests.cs b/03/GearRatios.Tests/PuzzleSolverTests.cs
index 74c000e..5ad3dfd 100644
--- a/03/GearRatios.Tests/PuzzleSolverTests.cs
+++ b/03/GearRatios.Tests/PuzzleSolverTests.cs
@@ -36,6 +36,8 @@ public class PuzzleSolverTests
".664.598..",
];
+ private static readonly string[] Input = File.ReadAllLines("INPUT.txt");
+
public static IEnumerable