Archived
1
0
Fork 0

Implemented steps over a funge space field

This commit is contained in:
Julien Dessaux 2021-10-05 22:46:37 +02:00
parent a952eaabb7
commit f6bd9fa1a8
2 changed files with 26 additions and 0 deletions

View file

@ -205,3 +205,14 @@ suite "Field":
])
f.Set(-7, 4, int('y'))
check f == xprependyappend
test "Step":
var minimal = Load("examples/minimal.b98")
var hello = Load("examples/hello.b98")
var dna = Load("examples/dna.b98")
check minimal[].Step((0, 0), (0, 0)) == (0, 0)
check minimal[].Step((0, 0), (1, 0)) == (0, 0)
check hello[].Step((3, 0), (0, 0)) == (3, 0)
check hello[].Step((3, 0), (1, 0)) == (4, 0)
check dna[].Step((1, 2), (3, 5)) == (4, 7)
check dna[].Step((6, 1), (1, 1)) == (5, 0)
check dna[].Step((1, 4), (-2, 2)) == (5, 0)