aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/patches/patches/037_structs.patch
blob: 7edad0f1eef7c271375002401ff1c78d3f23b06b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- exercises/037_structs.zig	2023-10-03 22:15:22.122241138 +0200
+++ answers/037_structs.zig	2023-10-05 20:04:07.009432674 +0200
@@ -36,6 +36,7 @@
     role: Role,
     gold: u32,
     experience: u32,
+    health: u8,
 };
 
 pub fn main() void {
@@ -44,6 +45,7 @@
         .role = Role.wizard,
         .gold = 20,
         .experience = 10,
+        .health = 100,
     };
 
     // Glorp gains some gold.