This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ash {value} {int}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun keyword {list of keywords} {list}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(car (cdr '{target list})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(and *file-modified* (ask-user-about-saving) (save-file)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(assoc {key} {assoc-list}) | |
returns: ({key} {value-list}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun div2 (n) (/ n 2)) | |
(mapcar #'div2 '(2 4 6)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *allowed-commands* '(look walk pickup inventory get)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(complement #'alphanumericp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-city-edges () | |
(let* ((nodes (loop for i from 1 to *node-num* | |
collect i)) | |
(edge-list (connect-all-islands nodes (make-edge-list))) | |
(cops (remove-if-not (lambda (x) | |
(declare (ignore x)) ;I added this to get rid of a compile warning ^.^ | |
(zerop (random *cop-odds*))) | |
edge-list))) | |
(add-cops (edges-to-alist edge-list) cops))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun known-city-nodes () | |
(mapcar (lambda (node) | |
(if (member node *visited-nodes*) | |
(let ((n (assoc node *congestion-city-nodes*))) | |
(if (eql node *player-pos*) | |
(append n '(*)) | |
n)) | |
(list node '?))) | |
(remove-duplicates (append *visited-nodes* | |
(mapcan (lambda (node) |