Added sub folders for common, extra, and framework code files
This commit is contained in:
parent
08a94ba068
commit
01c300dce1
@ -30,13 +30,13 @@ Here, we have a few conditionals to determine on the fly which of the numbers wo
|
||||
|
||||
:mag_right: Puzzle: <https://adventofcode.com/2024/day/3>, :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: <https://adventofcode.com/2024/day/4>, :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
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class BridgeRepair
|
||||
: public Solver
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class CeresSearch
|
||||
: public LinesSolver
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class ClawContraption
|
||||
: public Solver
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Interval.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Interval.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class DiskFragmenter
|
||||
: public Solver
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
#include <stack>
|
||||
|
||||
#include <aoc/Grid.hpp>
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Grid.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class GardenGroups
|
||||
: public LinesSolver
|
||||
|
@ -18,9 +18,9 @@
|
||||
#include <bitset>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Grid.hpp>
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Grid.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class GuardGallivant
|
||||
: public LinesSolver
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <set>
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class HistorianHysteria
|
||||
: public Solver
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class HoofIt
|
||||
: public LinesSolver
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/Graph.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Graph.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class LanParty : public Solver
|
||||
{
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullData.hpp>
|
||||
#include <aoc/MullStates.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/extra/MullData.hpp>
|
||||
#include <aoc/extra/MullStates.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class MullItOver
|
||||
: public Solver
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class PlutonianPebbles : public Solver
|
||||
{
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Grid.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Grid.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class PrintQueue
|
||||
: public Solver
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/RedNosedReportData.hpp>
|
||||
#include <aoc/Slope.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Slope.hpp>
|
||||
#include <aoc/extra/RedNosedReportData.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class RedNosedReports
|
||||
: public Solver
|
||||
|
@ -18,10 +18,10 @@
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/ReindeerMazeCrossing.hpp>
|
||||
#include <aoc/ReindeerMazePathIncidence.hpp>
|
||||
#include <aoc/WeightedEdgeGraph.hpp>
|
||||
#include <aoc/common/WeightedEdgeGraph.hpp>
|
||||
#include <aoc/extra/ReindeerMazeCrossing.hpp>
|
||||
#include <aoc/extra/ReindeerMazePathIncidence.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class ReindeerMaze
|
||||
: public LinesSolver
|
||||
|
@ -18,9 +18,9 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Grid.hpp>
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Grid.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class ResonantCollinearity
|
||||
: public LinesSolver
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class RestroomRedoubt
|
||||
: public Solver
|
||||
|
@ -15,10 +15,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/Lines.hpp>
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/WarehouseBoxPusher.hpp>
|
||||
#include <aoc/WarehouseWideBoxPusher.hpp>
|
||||
#include <aoc/common/Lines.hpp>
|
||||
#include <aoc/extra/WarehouseBoxPusher.hpp>
|
||||
#include <aoc/extra/WarehouseWideBoxPusher.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
class WarehouseWoes
|
||||
: public LinesSolver
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Vertex.hpp>
|
||||
#include <aoc/common/Vertex.hpp>
|
||||
|
||||
class Graph
|
||||
{
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
// Inspired by https://stackoverflow.com/a/32279494
|
||||
template <typename T>
|
@ -19,7 +19,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
/// <summary>
|
||||
/// A vector of strings of the same length, with methods to treat it as a rectangular, two-dimensional map of char and
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/StringStateMachine.hpp>
|
||||
#include <aoc/common/StringStateMachine.hpp>
|
||||
|
||||
class StringStateMachine;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <aoc/StringState.hpp>
|
||||
#include <aoc/common/StringState.hpp>
|
||||
|
||||
class StringState;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/VertexEdgeIncidence.hpp>
|
||||
#include <aoc/common/VertexEdgeIncidence.hpp>
|
||||
|
||||
class WeightedEdgeGraph
|
||||
{
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/StringState.hpp>
|
||||
#include <aoc/common/StringState.hpp>
|
||||
|
||||
class MullCharState
|
||||
: public StringState
|
@ -15,8 +15,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullData.hpp>
|
||||
#include <aoc/StringState.hpp>
|
||||
#include <aoc/common/StringState.hpp>
|
||||
#include <aoc/extra/MullData.hpp>
|
||||
|
||||
class MullDataState
|
||||
: public StringState
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullDataState.hpp>
|
||||
#include <aoc/extra/MullDataState.hpp>
|
||||
|
||||
class MullDoOpenState
|
||||
: public MullDataState
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/StringState.hpp>
|
||||
#include <aoc/common/StringState.hpp>
|
||||
|
||||
class MullEntryState
|
||||
: public StringState
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullDataState.hpp>
|
||||
#include <aoc/extra/MullDataState.hpp>
|
||||
|
||||
class MullFactorState
|
||||
: public MullDataState
|
@ -15,11 +15,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullCharState.hpp>
|
||||
#include <aoc/MullDoOpenState.hpp>
|
||||
#include <aoc/MullEntryState.hpp>
|
||||
#include <aoc/MullFactorState.hpp>
|
||||
#include <aoc/MullToggleCloseState.hpp>
|
||||
#include <aoc/extra/MullCharState.hpp>
|
||||
#include <aoc/extra/MullDoOpenState.hpp>
|
||||
#include <aoc/extra/MullEntryState.hpp>
|
||||
#include <aoc/extra/MullFactorState.hpp>
|
||||
#include <aoc/extra/MullToggleCloseState.hpp>
|
||||
|
||||
class MullStates
|
||||
{
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/MullDataState.hpp>
|
||||
#include <aoc/extra/MullDataState.hpp>
|
||||
|
||||
class MullToggleCloseState
|
||||
: public MullDataState
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include<vector>
|
||||
|
||||
#include <aoc/Slope.hpp>
|
||||
#include <aoc/common/Slope.hpp>
|
||||
|
||||
class RedNosedReportData
|
||||
{
|
@ -17,8 +17,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/ReindeerMazePathIncidence.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/extra/ReindeerMazePathIncidence.hpp>
|
||||
|
||||
class ReindeerMazeCrossing
|
||||
{
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
class ReindeerMazePathIncidence
|
||||
{
|
@ -18,8 +18,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Lines.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Lines.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
class WarehouseBoxPusher
|
||||
{
|
@ -15,7 +15,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <aoc/WarehouseBoxPusher.hpp>
|
||||
#include <aoc/extra/WarehouseBoxPusher.hpp>
|
||||
|
||||
class WarehouseWideBoxPusher
|
||||
: public WarehouseBoxPusher
|
@ -17,9 +17,9 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Lines.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/common/Lines.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class LinesSolver
|
||||
: public Solver
|
@ -20,7 +20,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class SolverEngine
|
||||
{
|
@ -18,7 +18,7 @@
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
#include <aoc/Math.hpp>
|
||||
#include <aoc/common/Math.hpp>
|
||||
|
||||
const std::string BridgeRepair::getPuzzleName() const
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Grid.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Grid.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
const std::string HoofIt::getPuzzleName() const
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <aoc/MullItOver.hpp>
|
||||
|
||||
#include <aoc/StringStateMachine.hpp>
|
||||
#include <aoc/common/StringStateMachine.hpp>
|
||||
|
||||
MullItOver::MullItOver()
|
||||
: Solver{}, data_{}, states_ { data_ }
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include <aoc/SolverEngine.hpp>
|
||||
#include <aoc/framework/SolverEngine.hpp>
|
||||
|
||||
// Solver implementations in day order.
|
||||
#include <aoc/HistorianHysteria.hpp>
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include <numeric>
|
||||
#include <sstream>
|
||||
|
||||
#include <aoc/Math.hpp>
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Math.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
RestroomRedoubt::RestroomRedoubt(const int width, const int height, const bool runPart2)
|
||||
: width_{ width }, height_{ height }, halfWidth_{ width / 2 }, halfHeight_{ height / 2 }, runPart2_{ runPart2 }
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Graph.hpp>
|
||||
#include <aoc/common/Graph.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Lines.hpp>
|
||||
#include <aoc/common/Lines.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Math.hpp>
|
||||
#include <aoc/common/Math.hpp>
|
||||
|
||||
#include <array>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Point2.hpp>
|
||||
#include <aoc/common/Point2.hpp>
|
||||
|
||||
const Point2 Point2::left{ -1, 0 };
|
||||
const Point2 Point2::right{ 1, 0 };
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/StringStateMachine.hpp>
|
||||
#include <aoc/common/StringStateMachine.hpp>
|
||||
|
||||
StringStateMachine::StringStateMachine(const std::string& line, StringState& entryState)
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Vertex.hpp>
|
||||
#include <aoc/common/Vertex.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/WeightedEdgeGraph.hpp>
|
||||
#include <aoc/common/WeightedEdgeGraph.hpp>
|
||||
|
||||
#include <limits>
|
||||
#include <queue>
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullCharState.hpp>
|
||||
#include <aoc/extra/MullCharState.hpp>
|
||||
|
||||
MullCharState::MullCharState(const char expected)
|
||||
: expected_{ expected }, successState_{}, failState_{}
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullData.hpp>
|
||||
#include <aoc/extra/MullData.hpp>
|
||||
|
||||
MullData::MullData()
|
||||
: isEnabled_{ true }, factor1_{ 0 }, factor2_{ 0 }, part1_{ 0 }, part2_{ 0 }
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullDataState.hpp>
|
||||
#include <aoc/extra/MullDataState.hpp>
|
||||
|
||||
void MullDataState::setData(MullData& data)
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullDoOpenState.hpp>
|
||||
#include <aoc/extra/MullDoOpenState.hpp>
|
||||
|
||||
void MullDoOpenState::next(StringStateMachine* stateMachine)
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullEntryState.hpp>
|
||||
#include <aoc/extra/MullEntryState.hpp>
|
||||
|
||||
void MullEntryState::enter(StringStateMachine* stateMachine)
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullFactorState.hpp>
|
||||
#include <aoc/extra/MullFactorState.hpp>
|
||||
|
||||
MullFactorState::MullFactorState(const char expected, const int index)
|
||||
: expected_{ expected }, index_{ index }, successState_{}, failState_{}
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullStates.hpp>
|
||||
#include <aoc/extra/MullStates.hpp>
|
||||
|
||||
MullStates::MullStates(MullData& data)
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/MullToggleCloseState.hpp>
|
||||
#include <aoc/extra/MullToggleCloseState.hpp>
|
||||
|
||||
MullToggleCloseState::MullToggleCloseState(const bool isEnabler)
|
||||
: isEnabler_{ isEnabler }, successState_{}
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/ReindeerMazeCrossing.hpp>
|
||||
#include <aoc/extra/ReindeerMazeCrossing.hpp>
|
||||
|
||||
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();
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/ReindeerMazePathIncidence.hpp>
|
||||
#include <aoc/extra/ReindeerMazePathIncidence.hpp>
|
||||
|
||||
ReindeerMazePathIncidence::ReindeerMazePathIncidence(const Point2 direction)
|
||||
: ReindeerMazePathIncidence(direction, -1)
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/WarehouseBoxPusher.hpp>
|
||||
#include <aoc/extra/WarehouseBoxPusher.hpp>
|
||||
|
||||
WarehouseBoxPusher::WarehouseBoxPusher(const char boxChar, const char wallChar, const char emptyChar)
|
||||
: boxChar_{ boxChar }, wallChar_{ wallChar }, emptyChar_{ emptyChar }
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/WarehouseWideBoxPusher.hpp>
|
||||
#include <aoc/extra/WarehouseWideBoxPusher.hpp>
|
||||
|
||||
#include <stack>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/LinesSolver.hpp>
|
||||
#include <aoc/framework/LinesSolver.hpp>
|
||||
|
||||
LinesSolver::LinesSolver(const int inputFileNameSuffix)
|
||||
: Solver{ inputFileNameSuffix }
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// You should have received a copy of the GNU General Public License along with
|
||||
// this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <aoc/SolverEngine.hpp>
|
||||
#include <aoc/framework/SolverEngine.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
@ -19,7 +19,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <aoc/Solver.hpp>
|
||||
#include <aoc/framework/Solver.hpp>
|
||||
|
||||
class TestContext
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <aoc/SolverEngine.hpp>
|
||||
#include <aoc/framework/SolverEngine.hpp>
|
||||
|
||||
void TestContext::run(const std::unique_ptr<Solver>&& solver, const long long int expected1,
|
||||
const long long int expected2, const std::vector<std::string>& inputPaths)
|
||||
|
Loading…
x
Reference in New Issue
Block a user