;; uses hardcoded global "world" pointer
(bind-func cell_check_result
(lambda (expected:CellValue*)
(let ((res (= (cell_value world
(tref expected 0)
(tref expected 1))
(tref expected 2))))
(if (not res)
(println "wrong for x =" (tref expected 0) "y =" (tref expected 1)
"got" (cell_value world
(tref expected 0)
(tref expected 1))
"was expecting" (tref expected 2)))
res)))