- 29 名前:デフォルトの名無しさん mailto:sage [2007/06/13(水) 07:47:49 ]
- 授業料もったいねーなぁ。ところでスタートとゴールの定義がわからねーんだけど。
それぞれ座標固定でいいの? (defstruct maze size data) (defun load-maze (file) (with-open-file (stream file :direction :input) (let ((size (read stream))) (make-maze :size size :data (make-array (list size size) :initial-contents (loop for data = (read stream nil :eof) until (eq data :eof) collect data)))))) (defun print-maze (maze &aux (size (maze-size maze))) (loop for row below size do (loop for col below size do (princ (if (eq (aref (maze-data maze) row col) 1) "+" " "))) (terpri)))
|

|