Add admin interface
This commit is contained in:
parent
8cba94e081
commit
8e31de0793
4 changed files with 34 additions and 3 deletions
|
@ -21,6 +21,12 @@
|
|||
:initform nil
|
||||
:accessor game-over)))
|
||||
|
||||
;;; Admin function
|
||||
(defmethod admin ((g game) &key (move nil move-supplied-p))
|
||||
(with-slots (snake) g
|
||||
(when move-supplied-p (setf (nth 0 snake) move))))
|
||||
|
||||
|
||||
;;; Class constructor to initialize the snake
|
||||
(defmethod initialize-instance :after ((g game) &key)
|
||||
(with-slots (snake initial-size initial-position) g
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue