From 362fdc1118ebe4699df05a4cbb0bbbe8f2a30a59 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 8 Aug 2022 21:41:55 +0200 Subject: Implemented the under funge command --- src/pointer.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/pointer.zig') diff --git a/src/pointer.zig b/src/pointer.zig index 7dbf566..7578a65 100644 --- a/src/pointer.zig +++ b/src/pointer.zig @@ -169,8 +169,11 @@ pub const Pointer = struct { p.reverse(); } }, - // TODO - 'u' => return error.NotImplemented, + 'u' => { + if (p.ss.under() catch true) { + p.reverse(); + } + }, 'g' => { const v = p.ss.toss.popVector(); try p.ss.toss.push(p.field.get(v[0] + p.sox, v[1] + p.soy)); -- cgit v1.2.3