aboutsummaryrefslogtreecommitdiff
path: root/src/2022/day14/aoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2022/day14/aoc.cpp')
-rw-r--r--src/2022/day14/aoc.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/2022/day14/aoc.cpp b/src/2022/day14/aoc.cpp
index a60f716..a96877d 100644
--- a/src/2022/day14/aoc.cpp
+++ b/src/2022/day14/aoc.cpp
@@ -1,7 +1,23 @@
#include "aoc.h"
namespace aoc2022 {
-std::pair<int, int> day14(line_view) {
+rock::three rock::t3;
+
+std::pair<int, int> day14(line_view file) {
+ std::vector<rock> rocks;
+ per_line(file, [&rocks](line_view lv){
+ rocks.emplace_back(lv);
+ return true;
+ });
+
+ // printf("%d %d %d\n", rock::t3.minx, rock::t3.maxx, rock::t3.maxy);
+ cave cv(rock::t3.maxx - rock::t3.minx, rock::t3.maxy);
+ for(auto& r: rocks) {
+ // r.print();
+ cv.mark(r);
+ }
+
+ // cv.print();
return {0, 0};
}
}