(bind-func world_copy
(lambda (w)
(let ((new_world (world_create (world_width w)
(world_height w)))
(old_data (world_data w))
(new_data (world_data new_world)))
;; copy the world data
(doloop (i (world_data_size w))
(pset! new_data i (pref old_data i)))
new_world)))