aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day22/aoc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/2015/day22/aoc.h')
-rw-r--r--src/2015/day22/aoc.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/2015/day22/aoc.h b/src/2015/day22/aoc.h
index 8596f55..5e793c4 100644
--- a/src/2015/day22/aoc.h
+++ b/src/2015/day22/aoc.h
@@ -5,14 +5,26 @@ namespace aoc2015 {
struct spell;
struct wizard {
- int points;
- int armor;
- int mana;
+ int points = 0;
+ int armor = 0;
+ int mana = 0;
wizard* wp = nullptr;
spell* spells[5] = {nullptr, nullptr, nullptr, nullptr, nullptr};
+
+ wizard () {}
+ wizard(wizard& w) {
+ points = w.points;
+ armor = w.armor;
+ mana = w.mana;
+ wp = w.wp;
+ for (int i = 0; i < 5; i++) {
+ spells[i] = w.spells[i];
+ }
+ }
};
struct spell {
+ const char * name;
int costs;
int turns;