diff --git a/2024/README.md b/2024/README.md new file mode 100644 index 0000000..b3b8f17 --- /dev/null +++ b/2024/README.md @@ -0,0 +1 @@ +... oops diff --git a/2025/Makefile b/2025/Makefile new file mode 100644 index 0000000..0de7060 --- /dev/null +++ b/2025/Makefile @@ -0,0 +1,15 @@ +CXX := clang++ +CXXFLAGS := -std=c++17 -Wall -Wextra -I. + +TARGET := aoc +SRC := aoc.cpp + +all: $(TARGET) + +$(TARGET): $(SRC) + $(CXX) $(CXXFLAGS) $(SRC) -o $(TARGET) + +clean: + rm -f $(TARGET) + +.PHONY: all clean diff --git a/2025/aoc b/2025/aoc new file mode 100755 index 0000000..a63ab4d Binary files /dev/null and b/2025/aoc differ diff --git a/2025/aoc.cpp b/2025/aoc.cpp new file mode 100644 index 0000000..5279120 --- /dev/null +++ b/2025/aoc.cpp @@ -0,0 +1,15 @@ +#include + +int main(int argc, char** argv) { + std::cout << "Advent of Code 2025 runner" << std::endl; + std::cout << "©Ben Kyd 2025, All Rights Reserved" << std::endl; + + std::cout << "\n\n Usage: -d [day] (omit for all)" << std::endl; + + // Parse command line + + // Find days + + // Run days +} + diff --git a/2025/aoc.hpp b/2025/aoc.hpp new file mode 100644 index 0000000..620e0c4 --- /dev/null +++ b/2025/aoc.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include +#include +#include + +struct FileFragment +{ + int Line,Col; + std::string Data; +}; + +class File +{ +public: + // loads full file into memory RAII style + // AS BLOB + File(std::filesystem::path path); + ~File(); + + void SplitBy(char delim) + { + + } + +private: + // Tokens are garunteed to be in-order + std::vector _tokens; + +}; + +class AOCDay +{ + public: + AOCDay(); + virtual ~AOCDay() = 0; + + virtual int PartOne(const File&) = 0; + virtual int PartTwo(const File&) = 0; +}; + + diff --git a/2025/day1.hpp b/2025/day1.hpp new file mode 100644 index 0000000..e69de29