Anyway I changed *valid-word* (I guess just wanting an asdf system is the previous version) to
(defvar *valid-words* (let ((ht (make-hash-table :test 'equal))) (loop for word in (apply 'append *bucketed-words*) do (setf (gethash word ht) t))))
(Yes I know, but there aren't that many words.).
Then I was able to
$ rlwrap ecl > (require "thirteen-words") > (13l:menu)
Also I missed that the game is that every wrong guess reveals a character. I thought you were asking me to just unscramble thirteen letters cold. So I
(defun delete-1st (ch list) (let ((idx (search `(,ch) list)) (cond ((null idx) list) (= idx (1- (length list)) (butlast list)) (t (append (subseq list 0 idx) (subseq list (1+ idx)))))) (defun word-has (word letters) (loop for lord = (coerce word 'list) then (delete-1st ch lord) for ch across letters when (not (member ch lord)) do (return-from word-has nil)) (list word)) (defun cheat (letters) (loop for word in (apply 'append *bucketed-words*) nconc (word-has word letters)))
;p my score is very good...