summaryrefslogtreecommitdiff
path: root/lisp/ouat/scrabble-util.lisp
blob: 0d9d1a3707ff4076f96bdf7f80ad91a3f06fef1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)