diff --git a/scripts/level.toy b/scripts/level.toy index 317bf2b..0bf5362 100644 --- a/scripts/level.toy +++ b/scripts/level.toy @@ -1,3 +1,18 @@ +/* + +How to run this program: + + toyrepl -n -t scripts/level.toy + +How to move around: + + move(up); + move(down); + move(left); + move(right); + +*/ + //constants var WIDTH: int const = 12; var HEIGHT: int const = 12; diff --git a/scripts/rule110.toy b/scripts/rule110.toy index 97cbaa3..d9b9b67 100644 --- a/scripts/rule110.toy +++ b/scripts/rule110.toy @@ -1,5 +1,5 @@ //number of iterations -var SIZE: int const = 260; +var SIZE: int const = 100; //lookup table var lookup = [ diff --git a/scripts/small.toy b/scripts/small.toy index 08ff76d..e69de29 100644 --- a/scripts/small.toy +++ b/scripts/small.toy @@ -1,28 +0,0 @@ -import standard; - -//test every -{ - var a = [1, 2, 3]; - var d = ["one": 1, "two": 2]; - - var counter = 0; - fn f(k, v) { - print " > " + string k + " : " + string v; - counter++; - return v; - } - - assert a.every(f) == true, "array.every() == true failed"; - assert d.every(f) == true, "dictionary.every() == true failed"; - - assert counter == 5, "Unexpected number of calls for _every() == true"; - - counter = 0; - a[1] = false; - d["two"] = false; - - assert a.every(f) == false, "array.every() == false failed"; - assert d.every(f) == false, "dictionary.every() == false failed"; - - assert counter == 4, "Unexpected number of calls for _every() == false"; -} \ No newline at end of file