diff options
Diffstat (limited to 'exercises/037_structs.zig')
-rw-r--r-- | exercises/037_structs.zig | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/exercises/037_structs.zig b/exercises/037_structs.zig index 32f7b41..0b6242f 100644 --- a/exercises/037_structs.zig +++ b/exercises/037_structs.zig @@ -36,15 +36,12 @@ const Character = struct { class: Class, gold: u32, experience: u32, + health: u8, }; pub fn main() void { // Please initialize Glorp with 100 health. - var glorp_the_wise = Character{ - .class = Class.wizard, - .gold = 20, - .experience = 10, - }; + var glorp_the_wise = Character{ .class = Class.wizard, .gold = 20, .experience = 10, .health = 100 }; // Glorp gains some gold. glorp_the_wise.gold += 5; |