Commit 8674c4f8 authored by Cory Chamblin's avatar Cory Chamblin

use loop for random-world as it is cleaner

parent 0893ddb6
......@@ -109,10 +109,9 @@
(defun random-world (width height)
(make-array (list height width)
:initial-contents (mapcar
(lambda (y)
(mapcar (lambda (x) (random-tile)) (alexandria:iota width)))
(alexandria:iota height))))
:initial-contents
(loop for row upto (1- height) collect
(loop for column upto (1- width) collect (random-tile)))))
(defun smooth (world)
(destructuring-bind (world-height world-width) (array-dimensions world)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment