(bind-func world_ascii_print
(lambda (w)
(let ((width (world_width w))
(height (world_height w))
(world_string_length (* (+ width 1) height))
(world_string:i8* (zalloc world_string_length)))
(doloop (i height)
(doloop (j width)
(if (<> (cell_value w i j) 0)
(pset! world_string (+ (* i (+ width 1)) j) (pref "0" 0))
(pset! world_string (+ (* i (+ width 1)) j) (pref " " 0)))
(if (= j (- width 1))
(pset! world_string
(- (* (+ 1 i) (+ width 1)) 1)
(pref "\n" 0)))))
(printf "\n%.*s"
world_string_length
world_string))))