From 2e5125cefda0c7c448e3d7f3b22a9d763fbf8d02 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 2 May 2023 16:50:09 +0200 Subject: [PATCH] Write level 9 --- levels/9.json | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/levels/9.json b/levels/9.json index d3acc37..0f681ae 100644 --- a/levels/9.json +++ b/levels/9.json @@ -1,35 +1,27 @@ { "field": [ " _________________ ", - "| |", - "| |", - "| |", - "| |", - "| |", - "| |", - "| |", + "| ######## |", + "| # # |", + "| # # |", + "| #$ # |", + "| # ## |", + "| # |", + "| #########|", "| |", " ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ " ], - "start position": [ 1, 1], - "start heading": "east", - "text": "TODO: Tell the player that loops will only check their condition at the start of the loop", + "start position": [17, 1], + "start heading": "south", + "text": "[Level 9]\n\nOne thing to note is that the code inside a loop always finishes running before\nthe condition is checked again. The simplest solution to this level will run\npast the goal before returning to it as a result of this.", "allowed commands": [ "step", "left", "right", - "take", - "repeat", - "while", - "if" + "while" ], "allowed conditions": [ - "facing north", - "facing south", - "facing east", - "facing west", "in front of wall", - "goal reached", - "on apple" + "goal reached" ] }