Skip to content

Instantly share code, notes, and snippets.

@spratt
Created March 26, 2011 22:19
Show Gist options
  • Save spratt/888692 to your computer and use it in GitHub Desktop.
Save spratt/888692 to your computer and use it in GitHub Desktop.
(defun ttt-print (board)
"Pretty prints a given board."
(format t "~% 1 2 3 <- cols~%~%")
(format t "1 ~1<~@[~A~]~>|~1<~@[~A~]~>|~1<~@[~A~]~>~% -+-+-~%"
(pop board) (pop board) (pop board))
(format t "2 ~1<~@[~A~]~>|~1<~@[~A~]~>|~1<~@[~A~]~>~% -+-+-~%"
(pop board) (pop board) (pop board))
(format t "3 ~1<~@[~A~]~>|~1<~@[~A~]~>|~1<~@[~A~]~>~%"
(pop board) (pop board) (pop board))
(format t "^~% \\_ rows~%"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment