[the-feebs-war-devel] document reviewed

Gustavo gugamilare at gmail.com
Wed Aug 4 00:55:01 UTC 2010


Hello, XIE Wensheng,

I'm sorry for not approving your post, but it's been so much time that I've
lost the admin password.

As you can see, the project is a little dead :S

I might work on it again at the end of this year or beginning of the next
one, but no promises.

>
> The document file has been reviewed and some spelling errors are corrected.
>

Thank you for reviewing the .tex file, I'll take a look at it and commit
later, and sorry for the spell mistakes.

>
>
> One question:
>
>
>
> Why the parameter ‘fireball-guaranteed-lifetime is not used in the program?
>
> How to use it?
>

It's a bug, I missed it, thanks for reporting. Now it is (hopefully) fixed and
committed (fortunately I remember the svn password :)

In case you wonder, these are the changes: in systems.lisp, create a slot
named lifetime:

(defclass object ()
  ((direction  :accessor object-direction  :initarg :direction)
   (x-position :accessor object-x-position :initarg :x-position)
   (y-position :accessor object-y-position :initarg :y-position)
   (lifetime   :accessor object-lifetime   :initarg :lifetime :initform 0)))


add a method for make-move:

(defmethod make-move :after (object move)
  (incf (object-lifetime object)))


and, in definitions/rules.lisp, make these changes:

(def-feeb-parm 'fireball-guaranteed-lifetime 3
  "Number of turns that a fireball is guaranteed not to dissipate,
unless it encounters a wall.")

(defmethod make-move-choice ((fireball fireball))
  (cond
   ((wallp (get-forward-pos fireball))
    (if (chance (get-feeb-parm 'fireball-reflection-probability))
        :turn-around
        :dissipate))
   ((and (>= (object-lifetime fireball)
             (get-feeb-parm 'fireball-guaranteed-lifetime))
         (chance (get-feeb-parm 'fireball-dissipation-probability)))
    :dissipate)
   (t :move-forward)))


Regards,
Gustavo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/the-feebs-war-devel/attachments/20100803/8a8b92d8/attachment.html>


More information about the the-feebs-war-devel mailing list