diff --git a/prelude.ld b/prelude.ld index c70f607..b6b0c3d 100644 --- a/prelude.ld +++ b/prelude.ld @@ -1271,7 +1271,7 @@ fn heading/vector { fn apply_command { "Takes a turtle state and a command and calculates a new state." (state, command) -> match command with { - (:goto, (x, y)) -> assoc (state, :position, (x, y)) + (:goto, (x, y)) -> assoc (state, :position, (neg (x), y)) (:home) -> assoc (state, :position, (0, 0)) (:clear) -> assoc (state, :position, (0, 0)) (:right, turns) -> update (state, :heading, add (_, turns))