summaryrefslogtreecommitdiff
path: root/exercises/037_structs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/037_structs.zig')
-rw-r--r--exercises/037_structs.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/exercises/037_structs.zig b/exercises/037_structs.zig
index c345faf..a7a9a2f 100644
--- a/exercises/037_structs.zig
+++ b/exercises/037_structs.zig
@@ -33,6 +33,7 @@ const Role = enum {
// Please add a new property to this struct called "health" and make
// it a u8 integer type.
const Character = struct {
+ health: u8,
role: Role,
gold: u32,
experience: u32,
@@ -41,6 +42,7 @@ const Character = struct {
pub fn main() void {
// Please initialize Glorp with 100 health.
var glorp_the_wise = Character{
+ .health = 100,
.role = Role.wizard,
.gold = 20,
.experience = 10,