From 871e68b38fedf78b28a01842c5b97485e79be225 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Tue, 4 Oct 2022 07:08:31 -0500 Subject: [PATCH] mention external editors in `def` Tutorial challenge --- data/scenarios/Tutorials/def.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/scenarios/Tutorials/def.yaml b/data/scenarios/Tutorials/def.yaml index 75906cfc..5c837cae 100644 --- a/data/scenarios/Tutorials/def.yaml +++ b/data/scenarios/Tutorials/def.yaml @@ -22,7 +22,15 @@ objectives: its contents and coordinates are shown in the lower left. - | TIP: the type annotation in a definition is optional. You could also write - `def m4 = move; move; move; move end`, and Swarm would infer the type of `m4`. + `def m4 = move; move; move; move end`, and Swarm would infer + the type of `m4`. + - | + TIP: writing function definitions at the prompt is annoying. + You can also put definitions in a `.sw` file and load it + with the `run` command. Check out + https://github.com/swarm-game/swarm/tree/main/editors + for help setting up an external editor with things like + syntax and error highlighting. condition: | try { as base {has "flower"}