dev.1711 - switched to multi-object-for-loops

This commit is contained in:
Chris Boesch
2023-02-21 21:43:40 +01:00
parent f9b3d50824
commit e7326dc5f9
9 changed files with 18 additions and 16 deletions

View File

@@ -44,7 +44,7 @@ pub fn main() void {
// it do and why?
// Printing all RPG characters in a loop:
for (chars) |c, num| {
for (chars, 0..) |c, num| {
std.debug.print("Character {} - G:{} H:{} XP:{}\n", .{
num + 1, c.gold, c.health, c.experience,
});