diff --git a/README.md b/README.md index cfb953f..4fd55c7 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ Here, we have a few conditionals to determine on the fly which of the numbers wo :mag_right: Puzzle: , :white_check_mark: Solver: [`MullItOver.cpp`](src/MullItOver.cpp) -A simple [finite state machine](include/aoc/StringStateMachine.hpp) crawling along the input character by character solves both parts nicely. The algorithm tracks whether `mul` instructions are enabled or not, but ignores this setting for part 1. +A simple [finite state machine](include/aoc/common/StringStateMachine.hpp) crawling along the input character by character solves both parts nicely. The algorithm tracks whether `mul` instructions are enabled or not, but ignores this setting for part 1. ### Day 4: Ceres Search :mag_right: Puzzle: , :white_check_mark: Solver: [`CeresSearch.cpp`](src/CeresSearch.cpp) -For this puzzle I added a class for [points in two-dimensional space](include/aoc/Point2.hpp), so I can use these for simplifying directional computations. With that, the algorithm looks for all `X` and `A` for part 1 and 2, respectively, and tries to find the remaining characters, starting from that `X` or `A`. +For this puzzle I added a class for [points in two-dimensional space](include/aoc/common/Point2.hpp), so I can use these for simplifying directional computations. With that, the algorithm looks for all `X` and `A` for part 1 and 2, respectively, and tries to find the remaining characters, starting from that `X` or `A`. ### Day 5: Print Queue diff --git a/include/aoc/BridgeRepair.hpp b/include/aoc/BridgeRepair.hpp index a531fbc..fd12c26 100644 --- a/include/aoc/BridgeRepair.hpp +++ b/include/aoc/BridgeRepair.hpp @@ -17,7 +17,7 @@ #include -#include +#include class BridgeRepair : public Solver diff --git a/include/aoc/CeresSearch.hpp b/include/aoc/CeresSearch.hpp index 5bab06e..a140179 100644 --- a/include/aoc/CeresSearch.hpp +++ b/include/aoc/CeresSearch.hpp @@ -17,7 +17,7 @@ #include -#include +#include class CeresSearch : public LinesSolver diff --git a/include/aoc/ClawContraption.hpp b/include/aoc/ClawContraption.hpp index f23710e..84f6f68 100644 --- a/include/aoc/ClawContraption.hpp +++ b/include/aoc/ClawContraption.hpp @@ -15,8 +15,8 @@ #pragma once -#include -#include +#include +#include class ClawContraption : public Solver diff --git a/include/aoc/DiskFragmenter.hpp b/include/aoc/DiskFragmenter.hpp index d4c21dd..15097d3 100644 --- a/include/aoc/DiskFragmenter.hpp +++ b/include/aoc/DiskFragmenter.hpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include class DiskFragmenter : public Solver diff --git a/include/aoc/GardenGroups.hpp b/include/aoc/GardenGroups.hpp index 03ab587..4ff613c 100644 --- a/include/aoc/GardenGroups.hpp +++ b/include/aoc/GardenGroups.hpp @@ -17,9 +17,9 @@ #include -#include -#include -#include +#include +#include +#include class GardenGroups : public LinesSolver diff --git a/include/aoc/GuardGallivant.hpp b/include/aoc/GuardGallivant.hpp index 35ca29a..950b7a3 100644 --- a/include/aoc/GuardGallivant.hpp +++ b/include/aoc/GuardGallivant.hpp @@ -18,9 +18,9 @@ #include #include -#include -#include -#include +#include +#include +#include class GuardGallivant : public LinesSolver diff --git a/include/aoc/HistorianHysteria.hpp b/include/aoc/HistorianHysteria.hpp index 782ba95..8e8197a 100644 --- a/include/aoc/HistorianHysteria.hpp +++ b/include/aoc/HistorianHysteria.hpp @@ -17,7 +17,7 @@ #include -#include +#include class HistorianHysteria : public Solver diff --git a/include/aoc/HoofIt.hpp b/include/aoc/HoofIt.hpp index c1c2779..5d902b5 100644 --- a/include/aoc/HoofIt.hpp +++ b/include/aoc/HoofIt.hpp @@ -17,8 +17,8 @@ #include -#include -#include +#include +#include class HoofIt : public LinesSolver diff --git a/include/aoc/LanParty.hpp b/include/aoc/LanParty.hpp index 1715cf0..79380f8 100644 --- a/include/aoc/LanParty.hpp +++ b/include/aoc/LanParty.hpp @@ -15,8 +15,8 @@ #pragma once -#include -#include +#include +#include class LanParty : public Solver { diff --git a/include/aoc/MullItOver.hpp b/include/aoc/MullItOver.hpp index f6111f9..ed30339 100644 --- a/include/aoc/MullItOver.hpp +++ b/include/aoc/MullItOver.hpp @@ -15,9 +15,9 @@ #pragma once -#include -#include -#include +#include +#include +#include class MullItOver : public Solver diff --git a/include/aoc/PlutonianPebbles.hpp b/include/aoc/PlutonianPebbles.hpp index 2e1dd7e..6cab9e3 100644 --- a/include/aoc/PlutonianPebbles.hpp +++ b/include/aoc/PlutonianPebbles.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include class PlutonianPebbles : public Solver { diff --git a/include/aoc/PrintQueue.hpp b/include/aoc/PrintQueue.hpp index 1e574c9..a8051b2 100644 --- a/include/aoc/PrintQueue.hpp +++ b/include/aoc/PrintQueue.hpp @@ -17,8 +17,8 @@ #include -#include -#include +#include +#include class PrintQueue : public Solver diff --git a/include/aoc/RedNosedReports.hpp b/include/aoc/RedNosedReports.hpp index 83be78e..f83f61e 100644 --- a/include/aoc/RedNosedReports.hpp +++ b/include/aoc/RedNosedReports.hpp @@ -15,9 +15,9 @@ #pragma once -#include -#include -#include +#include +#include +#include class RedNosedReports : public Solver diff --git a/include/aoc/ReindeerMaze.hpp b/include/aoc/ReindeerMaze.hpp index 7c8c3d8..3f6220f 100644 --- a/include/aoc/ReindeerMaze.hpp +++ b/include/aoc/ReindeerMaze.hpp @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class ReindeerMaze : public LinesSolver diff --git a/include/aoc/ResonantCollinearity.hpp b/include/aoc/ResonantCollinearity.hpp index a5cb040..d0e8a3b 100644 --- a/include/aoc/ResonantCollinearity.hpp +++ b/include/aoc/ResonantCollinearity.hpp @@ -18,9 +18,9 @@ #include #include -#include -#include -#include +#include +#include +#include class ResonantCollinearity : public LinesSolver diff --git a/include/aoc/RestroomRedoubt.hpp b/include/aoc/RestroomRedoubt.hpp index 0b93a6e..d1f1d4f 100644 --- a/include/aoc/RestroomRedoubt.hpp +++ b/include/aoc/RestroomRedoubt.hpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include class RestroomRedoubt : public Solver diff --git a/include/aoc/WarehouseWoes.hpp b/include/aoc/WarehouseWoes.hpp index b30127a..4a91c85 100644 --- a/include/aoc/WarehouseWoes.hpp +++ b/include/aoc/WarehouseWoes.hpp @@ -15,10 +15,10 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include class WarehouseWoes : public LinesSolver diff --git a/include/aoc/Graph.hpp b/include/aoc/common/Graph.hpp similarity index 97% rename from include/aoc/Graph.hpp rename to include/aoc/common/Graph.hpp index cfeb484..f3f8318 100644 --- a/include/aoc/Graph.hpp +++ b/include/aoc/common/Graph.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include class Graph { diff --git a/include/aoc/Grid.hpp b/include/aoc/common/Grid.hpp similarity index 98% rename from include/aoc/Grid.hpp rename to include/aoc/common/Grid.hpp index 4fdd381..c5a8d72 100644 --- a/include/aoc/Grid.hpp +++ b/include/aoc/common/Grid.hpp @@ -17,7 +17,7 @@ #include -#include +#include // Inspired by https://stackoverflow.com/a/32279494 template diff --git a/include/aoc/Interval.hpp b/include/aoc/common/Interval.hpp similarity index 100% rename from include/aoc/Interval.hpp rename to include/aoc/common/Interval.hpp diff --git a/include/aoc/Lines.hpp b/include/aoc/common/Lines.hpp similarity index 97% rename from include/aoc/Lines.hpp rename to include/aoc/common/Lines.hpp index 38fe8b8..0d815ff 100644 --- a/include/aoc/Lines.hpp +++ b/include/aoc/common/Lines.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include /// /// A vector of strings of the same length, with methods to treat it as a rectangular, two-dimensional map of char and diff --git a/include/aoc/Math.hpp b/include/aoc/common/Math.hpp similarity index 100% rename from include/aoc/Math.hpp rename to include/aoc/common/Math.hpp diff --git a/include/aoc/Point2.hpp b/include/aoc/common/Point2.hpp similarity index 100% rename from include/aoc/Point2.hpp rename to include/aoc/common/Point2.hpp diff --git a/include/aoc/Slope.hpp b/include/aoc/common/Slope.hpp similarity index 100% rename from include/aoc/Slope.hpp rename to include/aoc/common/Slope.hpp diff --git a/include/aoc/StringState.hpp b/include/aoc/common/StringState.hpp similarity index 95% rename from include/aoc/StringState.hpp rename to include/aoc/common/StringState.hpp index 88c5199..619ac70 100644 --- a/include/aoc/StringState.hpp +++ b/include/aoc/common/StringState.hpp @@ -17,7 +17,7 @@ #include -#include +#include class StringStateMachine; diff --git a/include/aoc/StringStateMachine.hpp b/include/aoc/common/StringStateMachine.hpp similarity index 96% rename from include/aoc/StringStateMachine.hpp rename to include/aoc/common/StringStateMachine.hpp index dc67d7f..600afef 100644 --- a/include/aoc/StringStateMachine.hpp +++ b/include/aoc/common/StringStateMachine.hpp @@ -17,7 +17,7 @@ #include -#include +#include class StringState; diff --git a/include/aoc/Vertex.hpp b/include/aoc/common/Vertex.hpp similarity index 100% rename from include/aoc/Vertex.hpp rename to include/aoc/common/Vertex.hpp diff --git a/include/aoc/VertexEdgeIncidence.hpp b/include/aoc/common/VertexEdgeIncidence.hpp similarity index 100% rename from include/aoc/VertexEdgeIncidence.hpp rename to include/aoc/common/VertexEdgeIncidence.hpp diff --git a/include/aoc/WeightedEdgeGraph.hpp b/include/aoc/common/WeightedEdgeGraph.hpp similarity index 96% rename from include/aoc/WeightedEdgeGraph.hpp rename to include/aoc/common/WeightedEdgeGraph.hpp index 3a99c5f..25e4e93 100644 --- a/include/aoc/WeightedEdgeGraph.hpp +++ b/include/aoc/common/WeightedEdgeGraph.hpp @@ -17,7 +17,7 @@ #include -#include +#include class WeightedEdgeGraph { diff --git a/include/aoc/MullCharState.hpp b/include/aoc/extra/MullCharState.hpp similarity index 96% rename from include/aoc/MullCharState.hpp rename to include/aoc/extra/MullCharState.hpp index 9c17e36..b402f63 100644 --- a/include/aoc/MullCharState.hpp +++ b/include/aoc/extra/MullCharState.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class MullCharState : public StringState diff --git a/include/aoc/MullData.hpp b/include/aoc/extra/MullData.hpp similarity index 100% rename from include/aoc/MullData.hpp rename to include/aoc/extra/MullData.hpp diff --git a/include/aoc/MullDataState.hpp b/include/aoc/extra/MullDataState.hpp similarity index 92% rename from include/aoc/MullDataState.hpp rename to include/aoc/extra/MullDataState.hpp index 3cad1bf..3eb2a39 100644 --- a/include/aoc/MullDataState.hpp +++ b/include/aoc/extra/MullDataState.hpp @@ -15,8 +15,8 @@ #pragma once -#include -#include +#include +#include class MullDataState : public StringState diff --git a/include/aoc/MullDoOpenState.hpp b/include/aoc/extra/MullDoOpenState.hpp similarity index 96% rename from include/aoc/MullDoOpenState.hpp rename to include/aoc/extra/MullDoOpenState.hpp index 6a67332..3e44789 100644 --- a/include/aoc/MullDoOpenState.hpp +++ b/include/aoc/extra/MullDoOpenState.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class MullDoOpenState : public MullDataState diff --git a/include/aoc/MullEntryState.hpp b/include/aoc/extra/MullEntryState.hpp similarity index 96% rename from include/aoc/MullEntryState.hpp rename to include/aoc/extra/MullEntryState.hpp index 948f6c9..1a53b12 100644 --- a/include/aoc/MullEntryState.hpp +++ b/include/aoc/extra/MullEntryState.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class MullEntryState : public StringState diff --git a/include/aoc/MullFactorState.hpp b/include/aoc/extra/MullFactorState.hpp similarity index 96% rename from include/aoc/MullFactorState.hpp rename to include/aoc/extra/MullFactorState.hpp index d588db7..513cb87 100644 --- a/include/aoc/MullFactorState.hpp +++ b/include/aoc/extra/MullFactorState.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class MullFactorState : public MullDataState diff --git a/include/aoc/MullStates.hpp b/include/aoc/extra/MullStates.hpp similarity index 86% rename from include/aoc/MullStates.hpp rename to include/aoc/extra/MullStates.hpp index 727fe21..ce64e74 100644 --- a/include/aoc/MullStates.hpp +++ b/include/aoc/extra/MullStates.hpp @@ -15,11 +15,11 @@ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class MullStates { diff --git a/include/aoc/MullToggleCloseState.hpp b/include/aoc/extra/MullToggleCloseState.hpp similarity index 96% rename from include/aoc/MullToggleCloseState.hpp rename to include/aoc/extra/MullToggleCloseState.hpp index 950d55f..d8ac72a 100644 --- a/include/aoc/MullToggleCloseState.hpp +++ b/include/aoc/extra/MullToggleCloseState.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class MullToggleCloseState : public MullDataState diff --git a/include/aoc/RedNosedReportData.hpp b/include/aoc/extra/RedNosedReportData.hpp similarity index 97% rename from include/aoc/RedNosedReportData.hpp rename to include/aoc/extra/RedNosedReportData.hpp index 7592b44..84bae6f 100644 --- a/include/aoc/RedNosedReportData.hpp +++ b/include/aoc/extra/RedNosedReportData.hpp @@ -17,7 +17,7 @@ #include -#include +#include class RedNosedReportData { diff --git a/include/aoc/ReindeerMazeCrossing.hpp b/include/aoc/extra/ReindeerMazeCrossing.hpp similarity index 92% rename from include/aoc/ReindeerMazeCrossing.hpp rename to include/aoc/extra/ReindeerMazeCrossing.hpp index a9b5cdf..be356aa 100644 --- a/include/aoc/ReindeerMazeCrossing.hpp +++ b/include/aoc/extra/ReindeerMazeCrossing.hpp @@ -17,8 +17,8 @@ #include -#include -#include +#include +#include class ReindeerMazeCrossing { diff --git a/include/aoc/ReindeerMazePathIncidence.hpp b/include/aoc/extra/ReindeerMazePathIncidence.hpp similarity index 97% rename from include/aoc/ReindeerMazePathIncidence.hpp rename to include/aoc/extra/ReindeerMazePathIncidence.hpp index 01ca275..dad1390 100644 --- a/include/aoc/ReindeerMazePathIncidence.hpp +++ b/include/aoc/extra/ReindeerMazePathIncidence.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class ReindeerMazePathIncidence { diff --git a/include/aoc/WarehouseBoxPusher.hpp b/include/aoc/extra/WarehouseBoxPusher.hpp similarity index 95% rename from include/aoc/WarehouseBoxPusher.hpp rename to include/aoc/extra/WarehouseBoxPusher.hpp index 192b664..f8b93e5 100644 --- a/include/aoc/WarehouseBoxPusher.hpp +++ b/include/aoc/extra/WarehouseBoxPusher.hpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include class WarehouseBoxPusher { diff --git a/include/aoc/WarehouseWideBoxPusher.hpp b/include/aoc/extra/WarehouseWideBoxPusher.hpp similarity index 96% rename from include/aoc/WarehouseWideBoxPusher.hpp rename to include/aoc/extra/WarehouseWideBoxPusher.hpp index 6db9c97..908b899 100644 --- a/include/aoc/WarehouseWideBoxPusher.hpp +++ b/include/aoc/extra/WarehouseWideBoxPusher.hpp @@ -15,7 +15,7 @@ #pragma once -#include +#include class WarehouseWideBoxPusher : public WarehouseBoxPusher diff --git a/include/aoc/LinesSolver.hpp b/include/aoc/framework/LinesSolver.hpp similarity index 91% rename from include/aoc/LinesSolver.hpp rename to include/aoc/framework/LinesSolver.hpp index a06b36d..82711f0 100644 --- a/include/aoc/LinesSolver.hpp +++ b/include/aoc/framework/LinesSolver.hpp @@ -17,9 +17,9 @@ #include -#include -#include -#include +#include +#include +#include class LinesSolver : public Solver diff --git a/include/aoc/Solver.hpp b/include/aoc/framework/Solver.hpp similarity index 100% rename from include/aoc/Solver.hpp rename to include/aoc/framework/Solver.hpp diff --git a/include/aoc/SolverEngine.hpp b/include/aoc/framework/SolverEngine.hpp similarity index 96% rename from include/aoc/SolverEngine.hpp rename to include/aoc/framework/SolverEngine.hpp index 783add0..43e76e6 100644 --- a/include/aoc/SolverEngine.hpp +++ b/include/aoc/framework/SolverEngine.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include class SolverEngine { diff --git a/src/BridgeRepair.cpp b/src/BridgeRepair.cpp index 8b2a02f..b8c8849 100644 --- a/src/BridgeRepair.cpp +++ b/src/BridgeRepair.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include const std::string BridgeRepair::getPuzzleName() const { diff --git a/src/HoofIt.cpp b/src/HoofIt.cpp index 21db13e..5c2bc3f 100644 --- a/src/HoofIt.cpp +++ b/src/HoofIt.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include const std::string HoofIt::getPuzzleName() const { diff --git a/src/MullItOver.cpp b/src/MullItOver.cpp index 81f4ab7..c830b8c 100644 --- a/src/MullItOver.cpp +++ b/src/MullItOver.cpp @@ -15,7 +15,7 @@ #include -#include +#include MullItOver::MullItOver() : Solver{}, data_{}, states_ { data_ } diff --git a/src/Program.cpp b/src/Program.cpp index 6c970b9..7aa7b44 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include // Solver implementations in day order. #include diff --git a/src/RestroomRedoubt.cpp b/src/RestroomRedoubt.cpp index 2ef2f09..614722c 100644 --- a/src/RestroomRedoubt.cpp +++ b/src/RestroomRedoubt.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include RestroomRedoubt::RestroomRedoubt(const int width, const int height, const bool runPart2) : width_{ width }, height_{ height }, halfWidth_{ width / 2 }, halfHeight_{ height / 2 }, runPart2_{ runPart2 } diff --git a/src/Graph.cpp b/src/common/Graph.cpp similarity index 97% rename from src/Graph.cpp rename to src/common/Graph.cpp index 3052cc4..e4de588 100644 --- a/src/Graph.cpp +++ b/src/common/Graph.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/Lines.cpp b/src/common/Lines.cpp similarity index 97% rename from src/Lines.cpp rename to src/common/Lines.cpp index 433264d..ba024bb 100644 --- a/src/Lines.cpp +++ b/src/common/Lines.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/Math.cpp b/src/common/Math.cpp similarity index 97% rename from src/Math.cpp rename to src/common/Math.cpp index 760ed28..d78f9dc 100644 --- a/src/Math.cpp +++ b/src/common/Math.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/Point2.cpp b/src/common/Point2.cpp similarity index 98% rename from src/Point2.cpp rename to src/common/Point2.cpp index ce629a8..57a7a8a 100644 --- a/src/Point2.cpp +++ b/src/common/Point2.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include const Point2 Point2::left{ -1, 0 }; const Point2 Point2::right{ 1, 0 }; diff --git a/src/StringStateMachine.cpp b/src/common/StringStateMachine.cpp similarity index 96% rename from src/StringStateMachine.cpp rename to src/common/StringStateMachine.cpp index 5bdb256..8c88daa 100644 --- a/src/StringStateMachine.cpp +++ b/src/common/StringStateMachine.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include StringStateMachine::StringStateMachine(const std::string& line, StringState& entryState) { diff --git a/src/Vertex.cpp b/src/common/Vertex.cpp similarity index 97% rename from src/Vertex.cpp rename to src/common/Vertex.cpp index 5722090..181372d 100644 --- a/src/Vertex.cpp +++ b/src/common/Vertex.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/WeightedEdgeGraph.cpp b/src/common/WeightedEdgeGraph.cpp similarity index 98% rename from src/WeightedEdgeGraph.cpp rename to src/common/WeightedEdgeGraph.cpp index dee4144..3da63e5 100644 --- a/src/WeightedEdgeGraph.cpp +++ b/src/common/WeightedEdgeGraph.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include #include diff --git a/src/MullCharState.cpp b/src/extra/MullCharState.cpp similarity index 96% rename from src/MullCharState.cpp rename to src/extra/MullCharState.cpp index 2183722..7465554 100644 --- a/src/MullCharState.cpp +++ b/src/extra/MullCharState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include MullCharState::MullCharState(const char expected) : expected_{ expected }, successState_{}, failState_{} diff --git a/src/MullData.cpp b/src/extra/MullData.cpp similarity index 97% rename from src/MullData.cpp rename to src/extra/MullData.cpp index 1ecaed0..b95bb2a 100644 --- a/src/MullData.cpp +++ b/src/extra/MullData.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include MullData::MullData() : isEnabled_{ true }, factor1_{ 0 }, factor2_{ 0 }, part1_{ 0 }, part2_{ 0 } diff --git a/src/MullDataState.cpp b/src/extra/MullDataState.cpp similarity index 95% rename from src/MullDataState.cpp rename to src/extra/MullDataState.cpp index d05f9d8..59e86cb 100644 --- a/src/MullDataState.cpp +++ b/src/extra/MullDataState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include void MullDataState::setData(MullData& data) { diff --git a/src/MullDoOpenState.cpp b/src/extra/MullDoOpenState.cpp similarity index 96% rename from src/MullDoOpenState.cpp rename to src/extra/MullDoOpenState.cpp index 2ab1fa3..b420153 100644 --- a/src/MullDoOpenState.cpp +++ b/src/extra/MullDoOpenState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include void MullDoOpenState::next(StringStateMachine* stateMachine) { diff --git a/src/MullEntryState.cpp b/src/extra/MullEntryState.cpp similarity index 96% rename from src/MullEntryState.cpp rename to src/extra/MullEntryState.cpp index 5fe33bf..6b1a2d9 100644 --- a/src/MullEntryState.cpp +++ b/src/extra/MullEntryState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include void MullEntryState::enter(StringStateMachine* stateMachine) { diff --git a/src/MullFactorState.cpp b/src/extra/MullFactorState.cpp similarity index 97% rename from src/MullFactorState.cpp rename to src/extra/MullFactorState.cpp index d74721a..d7d3b0b 100644 --- a/src/MullFactorState.cpp +++ b/src/extra/MullFactorState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include MullFactorState::MullFactorState(const char expected, const int index) : expected_{ expected }, index_{ index }, successState_{}, failState_{} diff --git a/src/MullStates.cpp b/src/extra/MullStates.cpp similarity index 97% rename from src/MullStates.cpp rename to src/extra/MullStates.cpp index 38a9c2a..c5274cd 100644 --- a/src/MullStates.cpp +++ b/src/extra/MullStates.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include MullStates::MullStates(MullData& data) { diff --git a/src/MullToggleCloseState.cpp b/src/extra/MullToggleCloseState.cpp similarity index 96% rename from src/MullToggleCloseState.cpp rename to src/extra/MullToggleCloseState.cpp index ee88baf..7c2f933 100644 --- a/src/MullToggleCloseState.cpp +++ b/src/extra/MullToggleCloseState.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include MullToggleCloseState::MullToggleCloseState(const bool isEnabler) : isEnabler_{ isEnabler }, successState_{} diff --git a/src/ReindeerMazeCrossing.cpp b/src/extra/ReindeerMazeCrossing.cpp similarity index 84% rename from src/ReindeerMazeCrossing.cpp rename to src/extra/ReindeerMazeCrossing.cpp index 26edcce..7d46330 100644 --- a/src/ReindeerMazeCrossing.cpp +++ b/src/extra/ReindeerMazeCrossing.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include ReindeerMazeCrossing::ReindeerMazeCrossing(const Point2 position) : position_{ position }, incidences{} @@ -27,6 +27,6 @@ Point2 ReindeerMazeCrossing::getPosition() const bool ReindeerMazeCrossing::isFinished() const { - return std::find_if(incidences.begin(), incidences.end(), [](auto& x) { return x.getPathVertex() < 0; }) == - incidences.end(); + return std::find_if(incidences.begin(), incidences.end(), + [](auto& x) { return x.getPathVertex() < 0; }) == incidences.end(); } diff --git a/src/ReindeerMazePathIncidence.cpp b/src/extra/ReindeerMazePathIncidence.cpp similarity index 96% rename from src/ReindeerMazePathIncidence.cpp rename to src/extra/ReindeerMazePathIncidence.cpp index fbaa5ae..99c6b40 100644 --- a/src/ReindeerMazePathIncidence.cpp +++ b/src/extra/ReindeerMazePathIncidence.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include ReindeerMazePathIncidence::ReindeerMazePathIncidence(const Point2 direction) : ReindeerMazePathIncidence(direction, -1) diff --git a/src/WarehouseBoxPusher.cpp b/src/extra/WarehouseBoxPusher.cpp similarity index 97% rename from src/WarehouseBoxPusher.cpp rename to src/extra/WarehouseBoxPusher.cpp index 889cd0c..cd0b302 100644 --- a/src/WarehouseBoxPusher.cpp +++ b/src/extra/WarehouseBoxPusher.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include WarehouseBoxPusher::WarehouseBoxPusher(const char boxChar, const char wallChar, const char emptyChar) : boxChar_{ boxChar }, wallChar_{ wallChar }, emptyChar_{ emptyChar } diff --git a/src/WarehouseWideBoxPusher.cpp b/src/extra/WarehouseWideBoxPusher.cpp similarity index 98% rename from src/WarehouseWideBoxPusher.cpp rename to src/extra/WarehouseWideBoxPusher.cpp index a120574..2aeadd9 100644 --- a/src/WarehouseWideBoxPusher.cpp +++ b/src/extra/WarehouseWideBoxPusher.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/LinesSolver.cpp b/src/framework/LinesSolver.cpp similarity index 96% rename from src/LinesSolver.cpp rename to src/framework/LinesSolver.cpp index 1fb2fe1..47e3bff 100644 --- a/src/LinesSolver.cpp +++ b/src/framework/LinesSolver.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include LinesSolver::LinesSolver(const int inputFileNameSuffix) : Solver{ inputFileNameSuffix } diff --git a/src/Solver.cpp b/src/framework/Solver.cpp similarity index 97% rename from src/Solver.cpp rename to src/framework/Solver.cpp index 6217d5f..77b5bca 100644 --- a/src/Solver.cpp +++ b/src/framework/Solver.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include diff --git a/src/SolverEngine.cpp b/src/framework/SolverEngine.cpp similarity index 98% rename from src/SolverEngine.cpp rename to src/framework/SolverEngine.cpp index 34bc9e1..0447758 100644 --- a/src/SolverEngine.cpp +++ b/src/framework/SolverEngine.cpp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include +#include #include #include diff --git a/tests/include/aocTests/TestContext.hpp b/tests/include/aocTests/TestContext.hpp index b17187e..d1b6710 100644 --- a/tests/include/aocTests/TestContext.hpp +++ b/tests/include/aocTests/TestContext.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include class TestContext { diff --git a/tests/src/TestContext.cpp b/tests/src/TestContext.cpp index 96b3803..53d5393 100644 --- a/tests/src/TestContext.cpp +++ b/tests/src/TestContext.cpp @@ -17,7 +17,7 @@ #include -#include +#include void TestContext::run(const std::unique_ptr&& solver, const long long int expected1, const long long int expected2, const std::vector& inputPaths)