aboutsummaryrefslogtreecommitdiff
path: root/examples/game/game.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-15 16:42:42 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-15 16:42:42 -0400
commit835eb7e89627eea923bfd57bdacba7065c6b1d4c (patch)
tree68fd9832252e728ccf0c7277a5a2f492e41c261c /examples/game/game.tm
parentfb37b0ee4253651cab10b41cc2e1f536b17b26d4 (diff)
Add optional:or_exit(...)
Diffstat (limited to 'examples/game/game.tm')
-rw-r--r--examples/game/game.tm4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/game/game.tm b/examples/game/game.tm
index c7020f55..8c5124d0 100644
--- a/examples/game/game.tm
+++ b/examples/game/game.tm
@@ -9,9 +9,7 @@ func main(map=(./map.txt)):
extern InitWindow:func(w:Int32, h:Int32, title:CString)->Void
InitWindow(1600, 900, "raylib [core] example - 2d camera")
- map_contents := if contents := map:read():
- contents
- else: exit(code=1, "Could not find the game map: $map")
+ map_contents := map:read():or_exit("Could not find the game map: $map")
World.CURRENT:load_map(map_contents)