summaryrefslogtreecommitdiff
path: root/ziglings
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-02-06 15:54:56 -0500
committerDave Gauer <dave@ratfactor.com>2021-02-06 15:54:56 -0500
commit507355ec3b1066c707e19816b86ac1fb56fc0385 (patch)
tree503c6e848879575646b39fab63d7888ee4d67576 /ziglings
parent2cded107cd75a4024d9d0f76055ef48432301fad (diff)
Added ex. 37,38 structs
Diffstat (limited to 'ziglings')
-rwxr-xr-xziglings6
1 files changed, 6 insertions, 0 deletions
diff --git a/ziglings b/ziglings
index 93b6819..b328b81 100755
--- a/ziglings
+++ b/ziglings
@@ -68,6 +68,10 @@ function check_it {
fi
}
+# I've chosen to explicitly number AND list each exercise rather than rely
+# on sorting. Though it does mean manually renaming things to remove/insert,
+# it's worked out well so far because its explicit and foolproof.
+
check_it 01_hello.zig "Hello world" "Note the error: the source file has a hint for fixing 'main'."
check_it 02_std.zig "Standard Library"
check_it 03_assignment.zig "55 314159 -11" "There are three mistakes in this one!"
@@ -104,6 +108,8 @@ check_it 33_iferror.zig "2<4. 3<4. 4=4. 5>4. 6>4." "Seriously, what's the deal w
check_it 34_quiz4.zig "my_num=42" "Can you make this work?"
check_it 35_enums.zig "1 2 3 9 8 7" "This problem seems familiar..."
check_it 36_enums2.zig "#0000ff" "I'm feeling blue about this."
+check_it 37_structs.zig "Your wizard has 90 health and 25 gold."
+check_it 38_structs2.zig "Character 2 - G:10 H:100 XP:20"
echo
echo " __ __ _ "