/[the-feebs-war]/package.lisp
ViewVC logotype

Diff of /package.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by gmilare, Wed Jan 2 15:40:42 2008 UTC revision 13 by gmilare, Fri Jan 4 02:20:39 2008 UTC
# Line 33  Line 33 
33  (defpackage :feebs  (defpackage :feebs
34    (:use :common-lisp)    (:use :common-lisp)
35    ;; Export everything we want the players to get their hands on.    ;; Export everything we want the players to get their hands on.
36    (:export *game-length*    (:export ;; Slots accessors
   
            ;; Strategic quantities  
            *points-for-killing* *points-for-dying*  
            *flame-energy* *mushroom-energy* *carcass-energy*  
            *maximum-energy*  
            *starting-energy*  
   
            ;; Game quantities  
            *maze-x-size*  
            *maze-y-size*  
            *number-of-mushrooms*  
   
            ;; Probabilities  
            *fireball-guaranteed-lifetime*  
            *fireball-dissipation-probability*  
            *fireball-reflection-probability*  
            *flame-no-recovery-time*  
            *flame-recovery-probability*  
   
            ;; Difficulty variables  
            *slow-feeb-noop-switch*  
            *slow-feeb-noop-factor*  
            *sense-location-p*  
 ;;         *sense-facing-p* ;; if this will be used, one must find a way to  
 ;;                          ;; a feeb detect other feeb's facing, and fireball's  
 ;;                          ;; direction, only relative to the feeb (in the brain call)  
 ;;                          ;; should not be so difficult  
            *may-get-maze-map-p*  
   
            ;; Slots accessors  
37             name facing             name facing
38             x-position y-position peeking line-of-sight             x-position y-position peeking line-of-sight
39             energy-reserve             energy-reserve
# Line 82  Line 52 
52             get-feeb-parm change-feeb-parm             get-feeb-parm change-feeb-parm
53             list-parameter-settings             list-parameter-settings
54    
55               game-length
56    
57               ;; Pontuation
58               points-for-killing points-for-dying
59               points-for-slow-down
60    
61               ;; Energy
62               flame-energy mushroom-energy carcass-energy
63               maximum-energy
64               starting-energy
65               carcass-rot-probability
66               carcass-guaranteed-lifetime
67    
68               ;; Game quantities
69               maze-x-size
70               maze-y-size
71               number-of-mushrooms
72    
73               ;; Probabilities
74               fireball-guaranteed-lifetime
75               fireball-dissipation-probability
76               fireball-reflection-probability
77               flame-no-recovery-time
78               flame-recovery-probability
79    
80               ;; Difficulty variables
81               slow-feeb-noop-switch
82               slow-feeb-noop-factor
83               reference-time
84               sense-location-p
85               may-get-maze-map-p
86    
87             ;; Settings             ;; Settings
88             define-feeb delete-feeb             define-feeb delete-feeb
89             feebs             feebs
# Line 92  Line 94 
94             north south east west             north south east west
95    
96             ;; Some layouts (can be find in mazes.lisp)             ;; Some layouts (can be find in mazes.lisp)
97             *maze-1* *maze-2* *maze-3* *maze-4* *maze-5*             *maze-0* *maze-1* *maze-2*
98               *maze-3* *maze-4* *maze-5*
99             make-template generate-maze             make-template generate-maze
100    
101             ;; Graphics             ;; Graphics
# Line 117  Line 120 
120    
121  (in-package :feebs)  (in-package :feebs)
122    
123    
124  ;;; Directions  ;;; Directions
125    
126  (deftype direction ()  (deftype direction ()
# Line 133  Line 137 
137  (defvar *number-of-mushroom-sites* 0)  (defvar *number-of-mushroom-sites* 0)
138  (defvar *feeb-parameters* nil)  (defvar *feeb-parameters* nil)
139    
 ;;; These are for security  
   
 (defvar *static-parameters* nil)  
140    
141  ;;; Setting up the maze.  ;;; Setting up the maze.
142    
# Line 147  Line 148 
148  (defvar *maze* nil)  (defvar *maze* nil)
149  (defvar *fake-maze* nil)  (defvar *fake-maze* nil)
150    
151  (defparameter *layout*  (defparameter *maze-0*
152    '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"    '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
153      "Xe   *        XXXXXXX XXXXXXXXXX"      "Xe   *        XXXXXXX XXXXXXXXXX"
154      "XXXXX XXXXXXX XXXXXXX    * XXXXX"      "XXXXX XXXXXXX XXXXXXX    * XXXXX"
# Line 181  Line 182 
182      "XXXXX XXXXXXXXXXXXX            X"      "XXXXX XXXXXXXXXXXXX            X"
183      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
184    
185    (defparameter *layout* *maze-0*)
186    
187    
188  ;;; Map size  ;;; Map size
189    
 (def-feeb-parm 'maze-x-size 32  
   "Horizontal size of the maze.")  
   
 (def-feeb-parm 'maze-y-size 32  
   "Vertical size of the maze.")  
   
190  (defvar *maze-x-size* 32)  (defvar *maze-x-size* 32)
191  (defvar *maze-y-size* 32)  (defvar *maze-y-size* 32)
192    
193    
194  ;;; Quantities during the game  ;;; Quantities during the game
195    
196  (defvar *mushroom-sites*)  (defvar *mushroom-sites* ())
197  (defvar *entry-points*)  (defvar *entry-points* ())
198  (defvar *number-of-entry-points*)  (defvar *number-of-entry-points* 0)
199  (defvar *mushrooms-alive*)  
200    
201  ;;; Elements in the maze  ;;; Elements in the maze
202    
203  (defvar *fireballs-flying*)  (defvar *feebs* ())
204  (defvar *dead-feebs*)  (defvar *dead-feebs* ())
205  (defvar *carcasses*)  (defvar *fireballs-flying* ())
206    (defvar *carcasses* ())
207    
208    
209  ;;; Current feeb playing  ;;; Current feeb playing
210  (defvar *playing-feeb*)  (defvar *playing-feeb* nil)
211    (defvar *feebs-to-be* ())
212    
213  (defmacro aif (test then &optional else)  (defmacro aif (test then &optional else)
214    `(let ((it ,test))    `(let ((it ,test))

Legend:
Removed from v.12  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.5