From 9306cb60c32082c5403931de0823a9fd5daa196c Mon Sep 17 00:00:00 2001 From: Jason Katz-Brown Date: Sun, 25 Aug 2013 02:17:13 -0700 Subject: Initial git commit. --- lisp/ouat/scrabble-util.lisp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lisp/ouat/scrabble-util.lisp (limited to 'lisp/ouat/scrabble-util.lisp') diff --git a/lisp/ouat/scrabble-util.lisp b/lisp/ouat/scrabble-util.lisp new file mode 100644 index 0000000..0d9d1a3 --- /dev/null +++ b/lisp/ouat/scrabble-util.lisp @@ -0,0 +1,17 @@ +(in-package :ouat) + +(defun row2uv-row (row) + (format nil "~A" (i1+ row))) + +(defun col2uv-col (col) + (string (code-char (i+ #.(char-code #\A) col)))) + +(defun uv-row2row (row) + (i1- (parse-integer row))) + +(defun uv-col2col (col) + (i- (char-code (elt col 0)) + #.(char-code #\A))) + +(defconstant +empty+ 0) +(defconstant +all-letters+ -1) \ No newline at end of file -- cgit v1.2.3