aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day22/aoc.cpp
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-12-07 15:45:52 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-12-07 15:45:52 +0800
commit152c1b1d68c9b9805c25a6c35f702e1d8d78e126 (patch)
tree0c37f05b699094f3ec475fb570656599d1abfd0d /src/2015/day22/aoc.cpp
parent3703e1e4aff85020af522e748d8b5e5feb33679f (diff)
downloadadvent-of-code-152c1b1d68c9b9805c25a6c35f702e1d8d78e126.tar.gz
advent-of-code-152c1b1d68c9b9805c25a6c35f702e1d8d78e126.zip
2022 day7
Diffstat (limited to 'src/2015/day22/aoc.cpp')
-rw-r--r--src/2015/day22/aoc.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/2015/day22/aoc.cpp b/src/2015/day22/aoc.cpp
index 1c33c66..1e6ae41 100644
--- a/src/2015/day22/aoc.cpp
+++ b/src/2015/day22/aoc.cpp
@@ -2,4 +2,23 @@
namespace aoc2015 {
+static spell bosskill = {0, 1, 8, 0, 0, 0, 0};
+static spell spells[5] = {
+ {53, 1, 4, 0, 0, 0, 0},
+ {73, 1, 2, 2, 0, 0, 0},
+ {113, 6, 0, 0, 0, 7, 0},
+ {173, 6, 3, 0, 0, 0, 0},
+ {229, 5, 0, 0, 101, 0, 0},
+};
+
+bool effects(wizard&);
+
+std::pair<int, int> day22(wizard me, wizard boss) {
+ me.spells[0] = & bosskill;
+ for (int i = 0; i < 5; i++) {
+ boss.spells[i] = spells + i;
+ }
+ return {0, 0};
+}
+
}