about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--chessboard.arc.t4
-rw-r--r--mu.arc20
2 files changed, 11 insertions, 13 deletions
diff --git a/chessboard.arc.t b/chessboard.arc.t
index 00f0723b..14c649f0 100644
--- a/chessboard.arc.t
+++ b/chessboard.arc.t
@@ -192,7 +192,7 @@
   (awhen rep.routine!error
     (prn "error - " it)))
 ;? (prn memory*.1)
-(when (~memory-contains-array memory*.1
+(when (~screen-contains memory*.1 20
           (+ "8 | r n b q k b n r "
              "7 | p p p p p p p p "
              "6 | _ _ _ _ _ _ _ _ "
@@ -249,7 +249,7 @@
   (awhen rep.routine!error
     (prn "error - " it)))
 ;? (prn memory*.1)
-(when (~memory-contains-array memory*.1
+(when (~screen-contains memory*.1 20
           (+ "8 | r n b q k b n r "
              "7 | p p p p p p p p "
              "6 | _ _ _ _ _ _ _ _ "
diff --git a/mu.arc b/mu.arc
index 2651979e..02cbd652 100644
--- a/mu.arc
+++ b/mu.arc
@@ -1652,17 +1652,15 @@
           (recur (+ addr 1) (+ idx 1)))))
 
 (def memory-contains-array (addr value)
-  (or
-    (and (>= memory*.addr len.value)
-         (loop (addr (+ addr 1)  ; skip count
-                idx  0)
-           (if (>= idx len.value)
-                 t
-               (~is memory*.addr value.idx)
-                 nil
-               :else
-                 (recur (+ addr 1) (+ idx 1)))))
-    (memory-contains-array-verbose addr value)))
+  (and (>= memory*.addr len.value)
+       (loop (addr (+ addr 1)  ; skip count
+              idx  0)
+         (if (>= idx len.value)
+               t
+             (~is memory*.addr value.idx)
+               nil
+             :else
+               (recur (+ addr 1) (+ idx 1))))))
 
 (def memory-contains-array-verbose (addr value)
   (prn "Mismatch when looking at @addr, size @memory*.addr vs @len.value")