From 5257941f40554da3f8df074443a4c087dcff7004 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Sat, 10 Dec 2022 23:02:40 +0000 Subject: 25-60 complete --- exercises/037_structs.zig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'exercises/037_structs.zig') 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; -- cgit v1.2.3-ZIG