aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/game_of_life.rh5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/game_of_life.rh b/examples/game_of_life.rh
index 4d6f9bb..a9da2bc 100644
--- a/examples/game_of_life.rh
+++ b/examples/game_of_life.rh
@@ -63,6 +63,7 @@ loop {
# Print field.
y = 0;
+ field_str = "";
loop if y < FIELD_HEIGHT {
row = "";
@@ -75,11 +76,11 @@ loop {
};
x = x + 1;
};
- print row;
+ field_str = "{field_str}{row}\n";
y = y + 1;
};
- print "";
+ print field_str;
field = new_field;
}; \ No newline at end of file