我在 Common Lisp 工作,试图让 Windows 游戏扫雷。
我有一个列表(1 1 1 2 2 2 3 3 3)
,想像矩阵一样打印
(1 1 1
2 2 2
3 3 3)
怎么做?
编辑
我在开始
(format t "Input width:")
(setf width (read))
(format t "Input height:")
(setf height (read))
(format t "How many mines:")
(setf brMina (read))
(defun matrica (i j)
(cond ((= 0 i) '())
(t (append (vrsta j) (matrica (1- i) j) ))))
(setf minefield (matrica width height))
(defun stampaj ()
(format t "~%~a" minefield ))