diff options
author | Julien Dessaux | 2022-08-08 21:41:55 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-08-08 21:41:55 +0200 |
commit | 362fdc1118ebe4699df05a4cbb0bbbe8f2a30a59 (patch) | |
tree | ad75509bc9962454804ce1bdc836b57babef9276 /src/pointer.zig | |
parent | Implemented the } (aka end) funge command (diff) | |
download | zigfunge98-362fdc1118ebe4699df05a4cbb0bbbe8f2a30a59.tar.gz zigfunge98-362fdc1118ebe4699df05a4cbb0bbbe8f2a30a59.tar.bz2 zigfunge98-362fdc1118ebe4699df05a4cbb0bbbe8f2a30a59.zip |
Implemented the under funge command
Diffstat (limited to 'src/pointer.zig')
-rw-r--r-- | src/pointer.zig | 7 |
1 files changed, 5 insertions, 2 deletions
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)); |