Skip to content

Commit

Permalink
Solved Day12 puzzle (#50)
Browse files Browse the repository at this point in the history
* First boilerplate day 12 code

* Tweak restore inputs script so that example inputs are copied back from tests

* Update and add missing .run files

* Finished part 1 of the puzzle

* Solved part two

* Fix formatting
  • Loading branch information
mMosiur authored Jul 18, 2024
1 parent 27e4927 commit 3c35f83
Show file tree
Hide file tree
Showing 35 changed files with 883 additions and 59 deletions.
20 changes: 20 additions & 0 deletions .run/Day01 example 1.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day01 example 1" type="DotNetProject" factoryName=".NET Project" folderName="Day01">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0/Day01.exe" />
<option name="PROGRAM_PARAMETERS" value="example1.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/Day01.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day01 example 2.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day01 example 2" type="DotNetProject" factoryName=".NET Project" folderName="Day01">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0/Day01.exe" />
<option name="PROGRAM_PARAMETERS" value="example2.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/Day01.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day01.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day01" type="DotNetProject" factoryName=".NET Project" folderName="Day01">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0/Day01.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day01 - Trebuchet/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day01 - Trebuchet/Day01.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day02 example.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day02 example" type="DotNetProject" factoryName=".NET Project" folderName="Day02">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day02 - Cube Conundrum/bin/Debug/net8.0/Day02.exe" />
<option name="PROGRAM_PARAMETERS" value="example.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day02 - Cube Conundrum/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day02 - Cube Conundrum/Day02.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day02.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day02" type="DotNetProject" factoryName=".NET Project" folderName="Day02">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day02 - Cube Conundrum/bin/Debug/net8.0/Day02.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day02 - Cube Conundrum/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day02 - Cube Conundrum/Day02.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day03 example.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day03 example" type="DotNetProject" factoryName=".NET Project" folderName="Day03">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day03 - Gear Ratios/bin/Debug/net8.0/Day03.exe" />
<option name="PROGRAM_PARAMETERS" value="example.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day03 - Gear Ratios/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day03 - Gear Ratios/Day03.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day03.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day03" type="DotNetProject" factoryName=".NET Project" folderName="Day03">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day03 - Gear Ratios/bin/Debug/net8.0/Day03.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day03 - Gear Ratios/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day03 - Gear Ratios/Day03.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day04 example.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day04 example" type="DotNetProject" factoryName=".NET Project" folderName="Day04">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day04 - Scratchcards/bin/Debug/net8.0/Day04.exe" />
<option name="PROGRAM_PARAMETERS" value="example.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day04 - Scratchcards/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day04 - Scratchcards/Day04.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day04.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day04" type="DotNetProject" factoryName=".NET Project" folderName="Day04">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day04 - Scratchcards/bin/Debug/net8.0/Day04.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day04 - Scratchcards/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day04 - Scratchcards/Day04.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day05 example.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day05 example" type="DotNetProject" factoryName=".NET Project" folderName="Day05">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/bin/Debug/net8.0/Day05.exe" />
<option name="PROGRAM_PARAMETERS" value="example.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/Day05.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day05.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day05" type="DotNetProject" factoryName=".NET Project" folderName="Day05">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/bin/Debug/net8.0/Day05.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day05 - If You Give A Seed A Fertilizer/Day05.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day06 example.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day06 example" type="DotNetProject" factoryName=".NET Project" folderName="Day06">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day06 - Wait For It/bin/Debug/net8.0/Day06.exe" />
<option name="PROGRAM_PARAMETERS" value="example.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day06 - Wait For It/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day06 - Wait For It/Day06.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/Day06.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day06" type="DotNetProject" factoryName=".NET Project" folderName="Day06">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day06 - Wait For It/bin/Debug/net8.0/Day06.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day06 - Wait For It/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day06 - Wait For It/Day06.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
37 changes: 18 additions & 19 deletions .run/Day10 example 6.run.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day10 example 6" type="DotNetProject" factoryName=".NET Project"
folderName="Day10">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0/Day10.exe"/>
<option name="PROGRAM_PARAMETERS" value="example6.txt"/>
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0"/>
<option name="PASS_PARENT_ENVS" value="1"/>
<option name="USE_EXTERNAL_CONSOLE" value="0"/>
<option name="USE_MONO" value="0"/>
<option name="RUNTIME_ARGUMENTS" value=""/>
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/Day10.csproj"/>
<option name="PROJECT_EXE_PATH_TRACKING" value="1"/>
<option name="PROJECT_ARGUMENTS_TRACKING" value="1"/>
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1"/>
<option name="PROJECT_KIND" value="DotNetCore"/>
<option name="PROJECT_TFM" value="net8.0"/>
<method v="2">
<option name="Build"/>
</method>
</configuration>
<configuration default="false" name="Day10 example 6" type="DotNetProject" factoryName=".NET Project" folderName="Day10">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0/Day10.exe" />
<option name="PROGRAM_PARAMETERS" value="example6.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/Day10.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
37 changes: 18 additions & 19 deletions .run/Day10 example 7.run.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Day10 example 7" type="DotNetProject" factoryName=".NET Project"
folderName="Day10">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0/Day10.exe"/>
<option name="PROGRAM_PARAMETERS" value="example7.txt"/>
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0"/>
<option name="PASS_PARENT_ENVS" value="1"/>
<option name="USE_EXTERNAL_CONSOLE" value="0"/>
<option name="USE_MONO" value="0"/>
<option name="RUNTIME_ARGUMENTS" value=""/>
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/Day10.csproj"/>
<option name="PROJECT_EXE_PATH_TRACKING" value="1"/>
<option name="PROJECT_ARGUMENTS_TRACKING" value="1"/>
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1"/>
<option name="PROJECT_KIND" value="DotNetCore"/>
<option name="PROJECT_TFM" value="net8.0"/>
<method v="2">
<option name="Build"/>
</method>
</configuration>
<configuration default="false" name="Day10 example 7" type="DotNetProject" factoryName=".NET Project" folderName="Day10">
<option name="EXE_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0/Day10.exe" />
<option name="PROGRAM_PARAMETERS" value="example7.txt" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Day10 - Pipe Maze/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Day10 - Pipe Maze/Day10.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
Loading

0 comments on commit 3c35f83

Please sign in to comment.