[the-feebs-war-cvs] r1 - feebs

gmilare at common-lisp.net gmilare at common-lisp.net
Wed Dec 19 20:36:54 UTC 2007


Author: gmilare
Date: Wed Dec 19 15:36:51 2007
New Revision: 1

Added:
   brains.fasl   (contents, props changed)
   brains.lisp
   extra.lisp
   feebs/
   feebs.asd
   feebs.tex
   feebs/WARNINGS
   feebs/feebs.css
   feebs/feebs.html
   feebs/index.html
   feebs/internals.pl
   feebs/labels.pl
   feebs/node1.html
   feebs/node10.html
   feebs/node11.html
   feebs/node12.html
   feebs/node13.html
   feebs/node14.html
   feebs/node15.html
   feebs/node16.html
   feebs/node17.html
   feebs/node18.html
   feebs/node19.html
   feebs/node2.html
   feebs/node20.html
   feebs/node21.html
   feebs/node22.html
   feebs/node23.html
   feebs/node24.html
   feebs/node3.html
   feebs/node4.html
   feebs/node5.html
   feebs/node6.html
   feebs/node7.html
   feebs/node8.html
   feebs/node9.html
   graphics.lisp
   license
   main.lisp
   mazes.lisp
   package.lisp
   system.lisp
Log:


Added: brains.fasl
==============================================================================
Binary file. No diff available.

Added: brains.lisp
==============================================================================
--- (empty file)
+++ brains.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,47 @@
+;;; -*- Common Lisp -*-
+
+(in-package :feebs)
+
+
+;;; Modified from "cautious-brain"
+
+
+(defun auto-brain (status proximity vision vision-left vision-right)
+  (declare (ignore vision-left vision-right))
+  (let ((stuff (my-square proximity)))
+    (cond ((and (member :mushroom stuff :test #'eq)
+		(< (energy-reserve status)
+		   (- *maximum-energy* 20)))
+	   :eat-mushroom)
+	  ((member :carcass stuff :test #'eq)
+	   :eat-carcass)
+	  ((and (ready-to-fire status)
+		(> (energy-reserve status) 30)
+		(dotimes (index (min (line-of-sight status) 5))
+		  (let ((feeb (car (member-if #'feeb-image-p (svref vision index)))))
+		    (if (and feeb
+			     (not (eq (feeb-image-facing feeb)
+				      (facing status))))
+			(return t)))))
+	   :flame)
+	  ((and (not (eq (left-square proximity) :rock))
+		(or (member :mushroom (left-square proximity))
+		    (> 3 (random 10))))
+	   :turn-left)
+	  ((and (not (eq (right-square proximity) :rock))
+		(or (member :mushroom (right-square proximity))
+		    (> 3 (random 10))))
+	   :turn-right)
+	  ((and (> (line-of-sight status) 0)
+		(not (dotimes (index (min (line-of-sight status) 7))
+		       (if (member-if #'fireball-image-p (svref vision index))
+			   (return t)))))
+	   :move-forward)
+	  (t
+	   :turn-around))))
+
+(defun make-auto-feebs (n)
+  (dotimes (i n)
+    (define-feeb
+	(format nil "System Feeb # ~d" i)
+	#'auto-brain)))
\ No newline at end of file

Added: extra.lisp
==============================================================================
--- (empty file)
+++ extra.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,125 @@
+;;; -*- Common Lisp -*-
+
+#|  Copyright (c) 2007 Gustavo Henrique Milaré
+
+    This file is part of The Feebs War.
+
+    The Feebs War is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    The Feebs War is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+|#
+
+
+;;; Usefull for creating a feeb
+;;; These are optimized so someone can use them without
+;;; complaining that they slow down your feeb !!!
+
+(in-package :feebs)
+
+(declaim (optimize (speed 3) (safety 0))
+
+	 (inline left-of right-of behind
+		 forward-dx forward-dy
+  		 left-dx left-dy
+  		 right-dx right-dy
+  		 behind-dx behind-dy
+		 
+	 	 relative-facing
+		 
+		 wallp chance)
+
+	 ((function ((integer 0 3)) (integer 0 3))
+	  left-of right-of behind
+	  relative-facing)
+	 
+	 ((function ((integer 0 3)) (integer -1 1)) 
+	  forward-dx forward-dy
+	  left-dx left-dy
+	  right-dx right-dy
+	  behind-dx behind-dy)
+
+	 ((function (rational) boolean)
+	  chance))
+
+;;; Directional arithmetic.
+
+(defun left-of (facing)
+  (mod (+ facing 3) 4))
+
+(defun right-of (facing)
+  (mod (+ facing 1) 4))
+
+(defun behind (facing)
+  (mod (+ facing 2) 4))
+
+(defun relative-facing (my-facing other-facing)
+  (mod (- my-facing other-facing) 4))
+
+(defun forward-dy (facing)
+  (if (oddp facing)
+      0
+      (rem (1- facing) 4)))
+
+(defun forward-dx (facing)
+  (if (oddp facing)
+      (rem (- 2 facing) 4)
+      0))
+
+(defun left-dy (facing)
+  (forward-dy (left-of facing)))
+
+(defun left-dx (facing)
+  (forward-dx (left-of facing)))
+
+(defun right-dy (facing)
+  (forward-dy (right-of facing)))
+
+(defun right-dx (facing)
+  (forward-dx (right-of facing)))
+
+(defun behind-dy (facing)
+  (forward-dy (behind facing)))
+
+(defun behind-dx (facing)
+  (forward-dx (behind facing)))
+
+;;; Tests
+
+(defun wallp (thing)
+  (the boolean
+    (eq :rock thing)))
+
+#|
+;;; Handling the vision, vision-left and vision-right objects
+ (defmacro with-visible-elements ((count line-of-sight)
+                                 ((vis   vision)       &body vis-body)
+				 ((vis-l vision-left)  &body vis-l-body)
+				 ((vis-r vision-right) &body vis-r-body)
+				 &body finalize)
+  (let ((v (gensym))
+	(vl (gensym))
+	(vr (gensym)))
+    `(do* ((,count 1 (1+ ,count))
+	   (,v  (svref ,vision ,count))
+	   (,vl (svref ,vision ,count))
+	   (,vr (svref ,vision ,count)))
+	  ((= ,count line-of-sight)
+	   , at finalize)
+       (declare (list ,v ,vl ,vr)
+	        (fixnum ,count)) ; can be assumed fixnum unless you have a mega PC 
+       (dolist (,vis   ,v)
+	 , at vis-body)
+       (dolist (,vis-l ,vl)
+	 , at vis-l-body)
+       (dolist (,vis-r ,vr)
+	 , at vis-r-body))))
+|#
\ No newline at end of file

Added: feebs.asd
==============================================================================
--- (empty file)
+++ feebs.asd	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,30 @@
+;;; -*- Common Lisp -*-
+
+(defpackage :feebs-system
+  (:use :cl :asdf))
+
+(in-package :feebs-system)
+
+(defsystem feebs
+    :description "The Feebs War is an extension of Planetof the Feebs"
+    :version "0.0.1"
+    :author "Gustavo Henrique Milaré <gugamilare at gmail.com>"
+    :licence "GPL"
+    
+    :components
+    (;; source
+     (:cl-source-file "package")
+     (:cl-source-file "main"   :depends-on ("package"))
+     (:cl-source-file "extra"  :depends-on ("main"))
+     (:cl-source-file "system" :depends-on ("extra"))
+     
+     (:cl-source-file "mazes"  :depends-on ("extra"))
+     (:cl-source-file "brains" :depends-on ("extra"))
+     
+     (:file "graphics"    :depends-on ("main"))
+     
+     ;; GPL
+     (:doc-file "licence")
+     
+     ;; documentation
+     (:doc-file "feebs.tex")))

Added: feebs.tex
==============================================================================
--- (empty file)
+++ feebs.tex	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,577 @@
+%% LyX 1.5.1 created this file.  For more info, see http://www.lyx.org/.
+%% Do not edit unless you really know what you are doing.
+\documentclass[english]{article}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\IfFileExists{url.sty}{\usepackage{url}}
+                      {\newcommand{\url}{\texttt}}
+
+\makeatletter
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
+\newenvironment{lyxlist}[1]
+{\begin{list}{}
+{\settowidth{\labelwidth}{#1}
+ \setlength{\leftmargin}{\labelwidth}
+ \addtolength{\leftmargin}{\labelsep}
+ \renewcommand{\makelabel}[1]{##1\hfil}}}
+{\end{list}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
+%   Copyright (c) 2007 Gustavo Henrique Milaré
+%
+%   This file is part of The Feebs War.
+%
+%   The Feebs War is free software; you can redistribute it and/or modify
+%   it under the terms of the GNU General Public License as published by
+%   the Free Software Foundation; either version 3 of the License, or
+%   (at your option) any later version.
+%
+%   The Feebs War is distributed in the hope that it will be useful,
+%   but WITHOUT ANY WARRANTY; without even the implied warranty of
+%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%   GNU General Public License for more details.
+%
+%   You should have received a copy of the GNU General Public License
+%   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+%% LyX 1.4.2 created this file.  For more info, see http://www.lyx.org/.
+
+
+
+\IfFileExists{url.sty}{\usepackage{url}
+}
+                      {\newcommand{\url}{\texttt}}
+
+\makeatletter
+
+
+
+
+\makeatother
+
+\usepackage{babel}
+\makeatother
+
+\begin{document}
+
+\title{\textbf{\huge The Feebs War}}
+
+
+\author{Gustavo Henrique Milaré}
+
+\maketitle
+\begin{abstract}
+\textit{The Feebs War} is a modified version of Planet of the Feebs
+\url{http://www.cliki.net/}, a game made for people learn and improve
+their lisp and code manipulation tecniques. The graphics are now displayed
+using PAL \url{http://common-lisp.net/project/pal/}'s libraries,
+so the problems with portability from CMUCL and X Window Sistem do
+not exist anymore. Also the code is cleaner and simpler both to make
+a feeb and to read the code. 
+\end{abstract}
+\tableofcontents{}
+
+
+\section{Introduction}
+
+The Feebs are intelligent and hostile creatures that live inside maze
+tunnels. They also have no mercy with each other, so they frequently
+throw a letal flame from through their mouth, and, after that, they
+can eat the carcass left. But throwing flames have an energy cost,
+so they must keep tracking for food.
+
+This game is intended to help lisp newbies (or maybe a little more
+advanced lispers) to learn lisp. A player must create a function that
+receives what his/her feeb is seeing and feeling, and returns what
+it will do next. To create the better feeb, one can create variables
+to store data from previous moves (or not), and can also use all the
+power of lisp to improve his/her creature.
+
+
+\subsection{Changes from \emph{Planet of the Feebs}}
+
+Many changes were made from the original game, but, if you have any
+feeb definition and you want to use it, it should be easy to adapt
+the brain function to the new rules.
+
+The main reason of this project is that \textit{Planet of the Feebs}
+is really interesting for (not just) newbies to learn lisp, but the
+difficulties to install, unportability and the ausence of competitors
+make it difficult to someone to be interested in making a feeb. So,
+I hope that making these adjustments and maybe creating some contests
+over the web make people be more interested in learning lisp.
+
+So, these are (some of) the changes:
+
+\begin{itemize}
+\item The graphics are not based on X Window Sistem anymore, but on PAL,
+and there are no CMUCL's event handler. This way, the code is more
+portable and graphics can be improved without those hundreds of lines
+that the original version has. Just creating some .bmp or .jpg files
+of a feeb and your feeb is much more personalized! 
+\item Every element of the map (except walls) is a list, so the brain of
+a feeb doesn't need to test all the time if the element is an atom
+or a list (wich, in my opinion, is really boring, unlispy and unnecessary
+in this case). That was only a reason to duplicate code and work,
+adding no results at all...
+\item Many functions and variables are changed and others were added. 
+\item Someone watching the game can control a Feeb with the keyboard, if
+he/she wants to, and say when the game must finish.
+\item This document is more objective than the one provided with \textit{Planet
+of the Feebs}, and is fully compatible with the code. This way it
+is easier to search for some information.
+\end{itemize}
+
+\section{The Game}
+
+
+\subsection{Overview}
+
+Your feeb's objective is to survive and kill other feebs. It is inside
+a maze of tunnels. Every turn, all feebs lose one unit of energy,
+and maybe starves. Your feeb is able to move forward, turn left, right
+or around, flame, peek around a corner, eat something or just wait.
+After all feebs move, the flames thrown before also move (or dissipate),
+carcasses may rot and mushrooms may grow, accordingly to some rules.
+
+To see what values are taken, one can use \textsf{\textbf{(list-parameter-settings)}}.
+Using \textsf{\textbf{setf}} gives the possibility to change them
+and \textsf{\textbf{documentation}} can be used to know them. Just
+remember that every probability must be a rational number (like 1/2).
+These parameters are just for one to know how the game is going to
+be, but in the begining there is no need to explicitly use them when
+creating the brain of a feeb.
+
+These are some global parameters:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{{*}game-length{*}}}}] Number of turns the game
+will last, or nil if there is a human player. 
+\item [{\textsf{\textbf{{*}points-for-killing{*}}}}] How many points some
+feeb earn for killing someone. 
+\item [{\textsf{\textbf{{*}points-for-dying{*}}}}] How many points some
+feeb earn for dying (usually negative). 
+\item [{\textsf{\textbf{{*}maze-x-size{*}}}}] Horizontal size of the maze. 
+\item [{\textsf{\textbf{{*}maze-y-size{*}}}}] Vertical size of the maze. 
+\item [{\textsf{\textbf{(get-maze-map)}}}] This command can be used to
+get the map (see section \ref{sub:Map}). 
+\end{lyxlist}
+
+\subsection{Throwing flame}
+
+If a feeb decides to throw a flame, and if it is prepared to, it will
+spend energy, and the next turn there will be a flame in the square
+in front of the feeb. For a few turns, the feeb will not be able to
+throw flames. The turn after the feeb throws the flame, it is able
+to see its own flame exactly in front of it, so it shouldn't move
+forward. Each turn, the flame moves forward destroing mushrooms and
+killing feebs it encounters, transforming them into carcass. If there
+is a wall, the flame can reflect, and will turn 180 degrees.
+
+Once a feeb is killed, in it's place in the maze there will appear
+a carcass. The feeb goes to the end of the killed feebs line. Whenever
+a carcass rots, the first feeb in line will reincarnate. So, dying
+is not so terrible.
+
+These are the parameters related to flames:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{{*}flame-energy{*}}}}] Amount of energy lost after
+throwing a flame. 
+\item [{\textsf{\textbf{{*}fireball-guaranteed-lifetime{*}}}}] Number of
+turns that a fireball is guaranteed not to dissipate, unless it encounters
+a wall.
+\item [{\textsf{\textbf{{*}fireball-dissipation-probability{*}}}}] Probability
+of the flame to dissipate each turn after the apropriate time.
+\item [{\textsf{\textbf{{*}fireball-reflection-probability{*}}}}] Probability
+of the flame to reflect when encountering a wall. 
+\item [{\textsf{\textbf{{*}flame-no-recovery-time{*}}}}] Number of turns
+that a feeb cannot fire.
+\item [{\textsf{\textbf{{*}flame-recovery-probability{*}}}}] Probability
+of the feeb to recover the hability to throw a flame, after the apropriate
+time.
+\end{lyxlist}
+
+\subsection{Eating food}
+
+There are two kinds of food, carcasses and mushrooms. Carcasses usually
+give less energy than mushrooms, and may rot, but, while it does not
+rot, a feeb can feed as long as it wishes. By eating food, the feeb
+will be able to recover energy, wich is important because, if a feeb
+stays with 0 or less units of energy, it starves.
+
+These are the quantities:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{{*}mushroom-energy{*}}}}] Amount of energy recovered
+when the feeb eats a mushroom. 
+\item [{\textsf{\textbf{{*}carcass-energy{*}}}}] Amount of energy recovered
+each turn that the feeb eats a carcass. 
+\item [{\textsf{\textbf{{*}carcass-guaranteed-lifetime{*}}}}] Number of
+turns that a carcass will surely stay there. After these turns, it
+can rot, depending on probabilities. 
+\item [{\textsf{\textbf{{*}carcass-rot-probability{*}}}}] Probability of
+the carcass to rot, after the apropriate time. 
+\item [{\textsf{\textbf{{*}maximum-energy{*}}}}] Maximum amount of energy
+that a feeb can have eating. 
+\item [{\textsf{\textbf{{*}starting-energy{*}}}}] Amount of energy a feeb
+has when it reincarnates. 
+\item [{\textsf{\textbf{{*}number-of-mushrooms{*}}}}] Quantity of mushrooms
+that exist in the maze. 
+\end{lyxlist}
+
+\section{The Feeb}
+
+A feeb needs four things: a name, a brain, an initialize function
+(optional) and a set of graphics (optional).
+
+\begin{itemize}
+\item The name, a string. 
+\item The brain is a function that decides what the feeb will do next, based
+on what it is seeing and feeling. 
+\item The initializer is invoked when the game is about to start, so it
+can analyze the map, global parameters, and so on. 
+\item The set of graphics is an image file (of format BMP, JPEG, PNG, and
+any others that supported by SDL\_image). 
+\end{itemize}
+One can create a feeb calling \textsf{\textbf{(define-feeb~}}\textsf{name~brain~}\textsf{\textbf{:initializer}}\textsf{~prepare~}\textsf{\textbf{:graphics}}\textsf{~graphics}\textsf{\textbf{)}}.
+If name is already used, a warning will be signaled, and the old feeb
+will be substituted. Calling \textsf{\textbf{(list-of-feebs)}} will
+return the list of the feebs (names only) that will be defined when
+the game begins. \textsf{\textbf{(delete-feeb}}\textsf{~name}\textsf{\textbf{)}}
+will delete the feeb with this name from this list, and \textsf{\textbf{(delete-all-feebs)}}
+will clear it.
+
+
+\subsection{Possible decisions}
+
+After processing the information available, the brain will take a
+decision. If this decision is not one of the decisions listed down,
+a warning will be signaled, and the result will be like \textsf{\textbf{:wait}}.
+Then, if someone are testing a brain function, he or she will be able
+to know if something goes wrong.
+
+The possible values that the brain function can return are these:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{:move-forward}}}] Move one square forward, unless
+there is a wall in front of the feeb. 
+\item [{\textsf{\textbf{:turn-left}}}] Turn 90 degrees to the left. 
+\item [{\textsf{\textbf{:turn-right}}}] Turn 90 degrees to the right. 
+\item [{\textsf{\textbf{:turn-around}}}] Turn 180 degrees. 
+\item [{\textsf{\textbf{:flame}}}] Throw a flame. The flame will be created
+next turn in the front square of the feeb. 
+\item [{\textsf{\textbf{:wait}}}] Do nothing in this turn. 
+\item [{\textsf{\textbf{:peek-left}}}] Peek to the left around a corner.
+The creature does note actually move, but, in the next turn, the creature
+will have the same vision that it would have if he had moved one step
+foward and turned left. This is used so a feeb can analize a corridor
+before trespassing it. 
+\item [{\textsf{\textbf{:peek-right}}}] Peek to the right around a corner,
+analogous of \textsf{\textbf{:peek-left}}. 
+\item [{\textsf{\textbf{:eat-carcass}}}] Eat a carcass if there is any
+available in the feeb's square. The amount of \textsf{\textbf{{*}carcass-energy{*}}}
+is restored to the feeb's energy. 
+\item [{\textsf{\textbf{:eat-mushroom}}}] Eat a mushroom if there is any
+available in the feeb's square. The amount of \textsf{\textbf{{*}mushroom-energy{*}}}
+is restored to the feeb's energy. 
+\end{lyxlist}
+
+\subsection{Information available}
+
+The brain of a feeb mus take five arguments; I'll call them \textsf{\emph{status}},
+\textsf{\emph{proximity}}, \textsf{\emph{vision}}, \textsf{\emph{vision-left}}
+and \textsf{\emph{vision-right}}.
+
+
+\subsubsection{Status}
+
+Every time the brain is called, it receives some useful information
+through \textsf{\textbf{status}}.
+
+The structure \textsf{\textbf{status}} keeps information about the
+feeb itself. Also it has information of the previous movement of the
+feeb. To access them, one must call:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{(name}}\textsf{\emph{~status}}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+name of the feeb.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(facing~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+Where
+the feeb is facing, one of the constants provided: \textsf{\textbf{north}},
+\textsf{\textbf{south}}, \textsf{\textbf{east}} or \textsf{\textbf{west}},
+wich are 0, 1, 2 and 3 respectivelly.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(x-position~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+horizontal position of the feeb, increasing to east. If \textsf{\textbf{{*}sense-location{*}}}
+is nil, it returns nil instead.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(y-position~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+vertical position of the feeb, increasing to north. If \textsf{\textbf{{*}sense-location{*}}}
+is nil, it returns nil instead.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(peeking~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+If
+it is \textsf{\textbf{:left}} or \textsf{\textbf{:right}}, it means
+that the current \textsf{\emph{vision}} provided is result of a previous
+\textsf{\textbf{:peek-left}} or \textsf{\textbf{:peek-right}} command
+of the same feeb. Otherwise, it is \textsf{\textbf{nil}}.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+Indicates
+the amount of valid entries in \textsf{\emph{vision}}. It actually
+means that \textsf{\textbf{(aref~}}\textsf{\emph{vision~}}\textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{))}}
+will return \textsf{\textbf{:rock}}.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(ready-to-fire~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+\textsf{\textbf{T}}
+indicates that the feeb is ready to fire. \textsf{\textbf{Nil}} indicates
+it is not.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(aborted}}\textsf{\emph{~status}}\textsf{\textbf{)}}}] \begin{flushleft}
+Related
+with timing. Returns \textsf{\textbf{T}} if the last move of feeb
+was aborted because of speed.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(last-move~}}\textsf{\emph{status}}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+feeb's previous move, or \textsf{\textbf{:dead}} if it has just reincarnated.
+\par\end{flushleft}
+\end{lyxlist}
+
+\subsubsection{Proximity and vision}
+
+The brain receives also information about what is near the feeb and
+what the feeb sees.
+
+The structure \textsf{\emph{proximity}} has the contents of the squares
+near the feeb, with these fields:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{(my-square~}}\textsf{\emph{proximity}}\textsf{\textbf{)}}}] \begin{flushleft}
+Contents
+of the feeb's current square.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(left-square~}}\textsf{\emph{proximity}}\textsf{\textbf{)}}}] \begin{flushleft}
+Contents
+of the right square of the feeb.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(right-square~}}\textsf{\emph{proximity}}\textsf{\textbf{)}}}] \begin{flushleft}
+Contents
+of the left square of the feeb.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(rear-square}}\textsf{\emph{~proximity}}\textsf{\textbf{)}}}] \begin{flushleft}
+Contents
+of the square behind the feeb.
+\par\end{flushleft}
+\item [{The}] vector \textsf{\emph{vision}} has the contents of the squares
+that are in front of the feeb. For example, \textsf{\textbf{(aref~}}\textsf{\emph{vision~}}\textsf{0}\textsf{\textbf{)}}
+will return the contents of the square in front of the feeb, \textsf{\textbf{(aref~}}\textsf{\emph{vision~}}\textsf{1}\textsf{\textbf{)}}
+will return the contents of the next square, and so on. As said before,
+\textsf{\textbf{(aref~}}\textsf{\emph{vision~}}\textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{))}}
+will be the first :rock encountered. All subsequents square, like
+\textsf{\textbf{(aref~}}\textsf{\emph{vision~}}\textsf{\textbf{(+~}}\textsf{1~}\textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{)))}},
+will be garbage and should not be used.
+\end{lyxlist}
+The contents of one square returned by any of these calls is either
+:rock or a list of elements, or maybe \textsf{\textbf{nil}} if the
+square is empty. Each element of the square is one of these:
+
+\begin{itemize}
+\item \textbf{Feeb image.} One can call \textsf{\textbf{(feeb-image-p~}}\textsf{element}\textsf{\textbf{)}}
+to see if element is a feeb image. 
+\item \textbf{Fireball image.} One can call \textsf{\textbf{(fireball-image-p~}}\textsf{element}\textsf{\textbf{)}}
+to check if element is a fireball image. 
+\item \textsf{\textbf{:carcass}}. If there is a \textsf{\textbf{:carcass}}
+in the square of the feeb (i.e. in \textsf{\textbf{(my-square~}}\textsf{\emph{proximity}}\textsf{\textbf{)}}),
+the call \textsf{\textbf{:eat-carcass}} will make the feeb eat it. 
+\item \textsf{\textbf{:mushroom}}. Analogous to \textsf{\textbf{:carcass}}.
+A mushroom appears randomly in places (mushroom patchs) previouly
+marked in the map. 
+\end{itemize}
+
+\subsubsection{Feebs and fireballs images}
+
+Both fireballs and feebs that are given to the brain function are
+not the real ones, but just images with contents that the brain function
+can access.
+
+These are the fields available:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{(feeb-image-name}}\textsf{~feeb-image}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+name of the feeb. Maybe you can know it's weakpoints.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(feeb-image-facing~}}\textsf{feeb-image}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+facing of the feeb. This way the brain function can see if the feeb-image
+either sees it or not.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(feeb-image-peeking~}}\textsf{feeb-image}\textsf{\textbf{)}}}] \begin{flushleft}
+Returns
+\textsf{\textbf{:peek-left}} or \textsf{\textbf{:peek-right}} if the
+feeb is peeking to (its) left or right, or \textsf{\textbf{nil}} if
+not.
+\par\end{flushleft}
+\item [{\textsf{\textbf{(fireball-image-direction~}}\textsf{fireball-image}\textsf{\textbf{)}}}] \begin{flushleft}
+The
+direction that the fireball image is going to.
+\par\end{flushleft}
+\end{lyxlist}
+
+\subsubsection{Vision-left and vision-right}
+
+\textsf{\emph{vision-left}} and \textsf{\emph{vision-right}} are vectors
+similar to vision, but they are less precise in the contents. Also
+their valid contents are limited by \textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{)}},
+so \textsf{\textbf{(aref~}}\textsf{\emph{vision-left~}}\textsf{\textbf{(line-of-sight~}}\textsf{\emph{status}}\textsf{\textbf{))}},
+for example, will return \textsf{\textbf{:unknown}}.
+
+Note that feebs that are not peeking, mushrooms and carcasses are
+\emph{not} be detected by these vectors. Also, if there is a feeb
+peeking to the opposite side, it won't be detected either. These are
+the possible returns of the elements in \textsf{\textbf{vision-left}}
+and \textsf{\textbf{vision-right}}:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{:peek-letf}}}] This means that in that square there
+is a feeb peeking to (its) left. 
+\item [{\textsf{\textbf{:peek-right}}}] This means that in that square
+there is a feeb peeking to (its) right. 
+\item [{\textsf{\textbf{nil}}}] This square is empty. 
+\item [{\textsf{\textbf{:rock}}}] This square is just a wall. 
+\end{lyxlist}
+
+\subsection{Extra functions provided}
+
+Before making the brain of your feeb, you might want to take a look
+at the Extra functions that are available at the end of the feebs.lisp
+file. The only thing you need so you can use them is to see their
+code and know what they do.
+
+
+\subsection{Graphics}
+
+With this version of the game, it's possible to choose the graphics
+of a feeb when creating it, so your feeb will be more personalized.
+
+The graphic of a feeb is defined by an image file, which should have
+three colunms by eight lines of pictures of the same size. The four
+first lines must be the animations of the feeb walking up, left, down
+and right, respectively. The next four lines must be the pictures
+of the feeb flaming up, left, down and right, respectively. To see
+an example, see {}``default-feeb.png''.
+
+After creating the image file, you must call \textsf{\textbf{(create-graphics}}\textsf{~path-to-image-file}\textsf{\textbf{)}}.
+If you now how to work with sdl surfaces in lispbuilder, you may use
+the function with a surface instead of a image file; or you can call
+\textsf{\textbf{(create-graphics~}}\textsf{path-to-image-file~nil}\textsf{\textbf{)}}
+if the surface should not be freed after the call. The result must
+be the third argument given to define-feeb.
+
+
+\subsection{Starting the game}
+
+The game loop is started by calling (feebs).
+
+
+\section{Contests}
+
+I sugest that you see this chapter only after you have created at
+least a basic brain feeb, wich is better than the (simple) provided
+brain, and when you want to participate of a contest or a game with
+your friends.
+
+
+\subsection{\label{sub:Map}Map}
+
+It is possible to get the maze map during the game, but with only
+the corridors. Note that the function that gets the map is purposely
+a little slow, so, invoking it too many times in a contest that uses
+timing atributes is not a good idea; anyway, it is possible to invoke
+this function before defining the feeb, and store its value somewhere.
+Also note that the map returned does not have any information about
+what is really in the maze, but only the possible ways.
+
+To get the map, one can call \textsf{\textbf{(get-maze-map)}}. This
+function will return \textsf{\textbf{nil}} if \textsf{\textbf{{*}may-get-maze-p{*}}}
+is also \textsf{\textbf{nil}}. Otherwise, the map returned is an array,
+so that calling \textsf{\textbf{(aref}}\textsf{~map~x~y}\textsf{\textbf{)}}
+will get the contents in the euclidean position (x,y) . The contents
+of a cell could be one of these:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{:mushroom-place}}}] A mushroom patch, i.e. when
+a mushroom is eaten it can come out here. 
+\item [{\textsf{\textbf{:feeb-entry-place}}}] A feeb entry, i.e. if a carcass
+rots a feeb can appear here. 
+\item [{\textsf{\textbf{:rock}}}] A wall. Feebs cannot come in this place. 
+\item [{\textsf{\textbf{nil}}}] An {}``empty'' place, i.e. neither of
+the previous. 
+\end{lyxlist}
+
+\subsection{Timing}
+
+There are also some timing atributes that can be given to the game.
+If the feeb takes too long to make a decision, there is more probability
+of its command to be aborted.
+
+To make this available, someone must set these:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{{*}slow-feeb-noop-switch{*}}}}] If is non-nil,
+there is a possibility that the move of a feeb is aborted according
+to its function time. Not applied to the human controlled feeb. 
+\item [{\textsf{\textbf{{*}slow-feeb-noop-factor{*}}}}] The probability
+of the feeb to abort will be this factor times the amount of time
+the feeb takes to have a decision, divided for the total time taken
+by all the feebs in the current turn. 
+\end{lyxlist}
+
+\subsection{Sense of location}
+
+Some accessors related to position and orientation of the feeb can
+be turned off.
+
+These are the parameters:
+
+\begin{lyxlist}{00.00.0000}
+\item [{\textsf{\textbf{{*}sense-location-p{*}}}}] Tells if the actual
+position of the feeb can be determinated accessing \textsf{\textbf{x-position}}
+and \textsf{\textbf{y-position}}. 
+\end{lyxlist}
+
+\subsection{Changing the rules}
+
+To change the rules of the contest, they must be changed before the
+feebs are defined, because in a feeb definition it could use the values
+of the variables to make a global strategy, and change the strategies
+after this could not be fair.
+
+All the parameters that can be listed using \textsf{\textbf{(list-parameter-settings)}}
+can be changed using setf. Also, they all have documentation about
+themselves, so feel free to use \textsf{\textbf{(documentation~}}\textsf{parameter~'variable}\textsf{\textbf{)}}
+and see what each parameter does. Documentation is available to external
+functions too.
+
+It is possible to change the layout of the map by calling \textsf{\textbf{(change-layout}}\textsf{~new-layout}\textsf{\textbf{)}}.
+There are a few predefined mazes that are \textsf{\textbf{{*}maze-0{*}}}
+throw \textsf{\textbf{{*}maze-5{*}}}. If you want to create a new
+map, take the template (commented) inside the same file, or create
+maybe a bigger template (of any size, because the values of \textsf{\textbf{{*}maze-x-size{*}}}
+and \textsf{\textbf{{*}maze-y-size{*}}} will be changed accordingly).
+
+
+\section{Reference}
+
+\begin{quote}
+Fahlman, S. E. \textbf{\emph{Planet of the Feebs -}} \emph{A Somewhat
+Educational Game.} \url{ftp://ftp.csl.sri.com/pub/users/gilham/feebs/feebs.tex}. 
+\end{quote}
+
+\end{document}

Added: feebs/WARNINGS
==============================================================================
--- (empty file)
+++ feebs/WARNINGS	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,9 @@
+No implementation found for style `fontenc'
+No implementation found for style `url'
+
+redefining command \url 
+
+previous meaning of \url will be lost
+
+The feebs.aux file was not found, so sections will not be numbered 
+and cross-references will be shown as icons.

Added: feebs/feebs.css
==============================================================================
--- (empty file)
+++ feebs/feebs.css	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,30 @@
+/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */
+.MATH    { font-family: "Century Schoolbook", serif; }
+.MATH I  { font-family: "Century Schoolbook", serif; font-style: italic }
+.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold }
+
+/* implement both fixed-size and relative sizes */
+SMALL.XTINY		{ font-size : xx-small }
+SMALL.TINY		{ font-size : x-small  }
+SMALL.SCRIPTSIZE	{ font-size : smaller  }
+SMALL.FOOTNOTESIZE	{ font-size : small    }
+SMALL.SMALL		{  }
+BIG.LARGE		{  }
+BIG.XLARGE		{ font-size : large    }
+BIG.XXLARGE		{ font-size : x-large  }
+BIG.HUGE		{ font-size : larger   }
+BIG.XHUGE		{ font-size : xx-large }
+
+/* heading styles */
+H1		{  }
+H2		{  }
+H3		{  }
+H4		{  }
+H5		{  }
+
+/* mathematics styles */
+DIV.displaymath		{ }	/* math displays */
+TD.eqno			{ }	/* equation-number cells */
+
+
+/* document-specific styles come next */

Added: feebs/feebs.html
==============================================================================
--- (empty file)
+++ feebs/feebs.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>The Feebs War</TITLE>
+<META NAME="description" CONTENT="The Feebs War">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node1.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html4"
+  HREF="node1.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up_g.png"> 
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev_g.png"> 
+<A NAME="tex2html2"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html5"
+  HREF="node1.html">Contents</A>
+   <B>  <A NAME="tex2html3"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<P>
+
+<P>
+
+<P>
+<H1 ALIGN="CENTER"><B><FONT SIZE="+3">The Feebs War</FONT></B></H1>
+<DIV>
+
+<P ALIGN="CENTER"><STRONG>Gustavo Henrique Milaré</STRONG></P>
+</DIV>
+
+<H3>Abstract:</H3>
+<DIV>
+<I>The Feebs War</I> is a modified version of Planet of the Feebs
+http://www.cliki.net/, a game made for people learn and improve
+their lisp and code manipulation tecniques. The graphics are now displayed
+using PAL http://common-lisp.net/project/pal/'s libraries,
+so the problems with portability from CMUCL and X Window Sistem do
+not exist anymore. Also the code is cleaner and simpler both to make
+a feeb and to read the code. 
+</DIV>
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"></A>
+
+<UL>
+<LI><A NAME="tex2html6"
+  HREF="node1.html">Contents</A>
+<LI><A NAME="tex2html7"
+  HREF="node2.html">Introduction</A>
+<UL>
+<LI><A NAME="tex2html8"
+  HREF="node3.html">Changes from <I>Planet of the Feebs</I></A>
+</UL>
+<BR>
+<LI><A NAME="tex2html9"
+  HREF="node4.html">The Game</A>
+<UL>
+<LI><A NAME="tex2html10"
+  HREF="node5.html">Overview</A>
+<LI><A NAME="tex2html11"
+  HREF="node6.html">Throwing flame</A>
+<LI><A NAME="tex2html12"
+  HREF="node7.html">Eating food</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html13"
+  HREF="node8.html">The Feeb</A>
+<UL>
+<LI><A NAME="tex2html14"
+  HREF="node9.html">Possible decisions</A>
+<LI><A NAME="tex2html15"
+  HREF="node10.html">Information available</A>
+<UL>
+<LI><A NAME="tex2html16"
+  HREF="node11.html">Status</A>
+<LI><A NAME="tex2html17"
+  HREF="node12.html">Proximity and vision</A>
+<LI><A NAME="tex2html18"
+  HREF="node13.html">Feebs and fireballs images</A>
+<LI><A NAME="tex2html19"
+  HREF="node14.html">Vision-left and vision-right</A>
+</UL>
+<LI><A NAME="tex2html20"
+  HREF="node15.html">Extra functions provided</A>
+<LI><A NAME="tex2html21"
+  HREF="node16.html">Graphics</A>
+<LI><A NAME="tex2html22"
+  HREF="node17.html">Starting the game</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html23"
+  HREF="node18.html">Contests</A>
+<UL>
+<LI><A NAME="tex2html24"
+  HREF="node19.html">Map</A>
+<LI><A NAME="tex2html25"
+  HREF="node20.html">Timing</A>
+<LI><A NAME="tex2html26"
+  HREF="node21.html">Sense of location</A>
+<LI><A NAME="tex2html27"
+  HREF="node22.html">Changing the rules</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html28"
+  HREF="node23.html">Reference</A>
+<LI><A NAME="tex2html29"
+  HREF="node24.html">About this document ...</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/index.html
==============================================================================
--- (empty file)
+++ feebs/index.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>The Feebs War</TITLE>
+<META NAME="description" CONTENT="The Feebs War">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node1.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html4"
+  HREF="node1.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up_g.png"> 
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev_g.png"> 
+<A NAME="tex2html2"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html5"
+  HREF="node1.html">Contents</A>
+   <B>  <A NAME="tex2html3"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<P>
+
+<P>
+
+<P>
+<H1 ALIGN="CENTER"><B><FONT SIZE="+3">The Feebs War</FONT></B></H1>
+<DIV>
+
+<P ALIGN="CENTER"><STRONG>Gustavo Henrique Milaré</STRONG></P>
+</DIV>
+
+<H3>Abstract:</H3>
+<DIV>
+<I>The Feebs War</I> is a modified version of Planet of the Feebs
+http://www.cliki.net/, a game made for people learn and improve
+their lisp and code manipulation tecniques. The graphics are now displayed
+using PAL http://common-lisp.net/project/pal/'s libraries,
+so the problems with portability from CMUCL and X Window Sistem do
+not exist anymore. Also the code is cleaner and simpler both to make
+a feeb and to read the code. 
+</DIV>
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"></A>
+
+<UL>
+<LI><A NAME="tex2html6"
+  HREF="node1.html">Contents</A>
+<LI><A NAME="tex2html7"
+  HREF="node2.html">Introduction</A>
+<UL>
+<LI><A NAME="tex2html8"
+  HREF="node3.html">Changes from <I>Planet of the Feebs</I></A>
+</UL>
+<BR>
+<LI><A NAME="tex2html9"
+  HREF="node4.html">The Game</A>
+<UL>
+<LI><A NAME="tex2html10"
+  HREF="node5.html">Overview</A>
+<LI><A NAME="tex2html11"
+  HREF="node6.html">Throwing flame</A>
+<LI><A NAME="tex2html12"
+  HREF="node7.html">Eating food</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html13"
+  HREF="node8.html">The Feeb</A>
+<UL>
+<LI><A NAME="tex2html14"
+  HREF="node9.html">Possible decisions</A>
+<LI><A NAME="tex2html15"
+  HREF="node10.html">Information available</A>
+<UL>
+<LI><A NAME="tex2html16"
+  HREF="node11.html">Status</A>
+<LI><A NAME="tex2html17"
+  HREF="node12.html">Proximity and vision</A>
+<LI><A NAME="tex2html18"
+  HREF="node13.html">Feebs and fireballs images</A>
+<LI><A NAME="tex2html19"
+  HREF="node14.html">Vision-left and vision-right</A>
+</UL>
+<LI><A NAME="tex2html20"
+  HREF="node15.html">Extra functions provided</A>
+<LI><A NAME="tex2html21"
+  HREF="node16.html">Graphics</A>
+<LI><A NAME="tex2html22"
+  HREF="node17.html">Starting the game</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html23"
+  HREF="node18.html">Contests</A>
+<UL>
+<LI><A NAME="tex2html24"
+  HREF="node19.html">Map</A>
+<LI><A NAME="tex2html25"
+  HREF="node20.html">Timing</A>
+<LI><A NAME="tex2html26"
+  HREF="node21.html">Sense of location</A>
+<LI><A NAME="tex2html27"
+  HREF="node22.html">Changing the rules</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html28"
+  HREF="node23.html">Reference</A>
+<LI><A NAME="tex2html29"
+  HREF="node24.html">About this document ...</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/internals.pl
==============================================================================
--- (empty file)
+++ feebs/internals.pl	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,10 @@
+# LaTeX2HTML 2002-2-1 (1.71)
+# Associate internals original text with physical files.
+
+
+$key = q/sub:Map/;
+$ref_files{$key} = "$dir".q|node19.html|; 
+$noresave{$key} = "$nosave";
+
+1;
+

Added: feebs/labels.pl
==============================================================================
--- (empty file)
+++ feebs/labels.pl	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,17 @@
+# LaTeX2HTML 2002-2-1 (1.71)
+# Associate labels original text with physical files.
+
+
+$key = q/sub:Map/;
+$external_labels{$key} = "$URL/" . q|node19.html|; 
+$noresave{$key} = "$nosave";
+
+1;
+
+
+# LaTeX2HTML 2002-2-1 (1.71)
+# labels from external_latex_labels array.
+
+
+1;
+

Added: feebs/node1.html
==============================================================================
--- (empty file)
+++ feebs/node1.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Contents</TITLE>
+<META NAME="description" CONTENT="Contents">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node2.html">
+<LINK REL="previous" HREF="feebs.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node2.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html38"
+  HREF="node2.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html36"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html30"
+  HREF="feebs.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A>   
+<BR>
+<B> Next:</B> <A NAME="tex2html39"
+  HREF="node2.html">Introduction</A>
+<B> Up:</B> <A NAME="tex2html37"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html31"
+  HREF="feebs.html">The Feebs War</A>
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+<BR>
+
+<H2><A NAME="SECTION00010000000000000000">
+Contents</A>
+</H2>
+<!--Table of Contents-->
+
+<UL>
+<LI><A NAME="tex2html40"
+  HREF="node2.html">Introduction</A>
+<UL>
+<LI><A NAME="tex2html41"
+  HREF="node3.html">Changes from Planet of the Feebs</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html42"
+  HREF="node4.html">The Game</A>
+<UL>
+<LI><A NAME="tex2html43"
+  HREF="node5.html">Overview</A>
+<LI><A NAME="tex2html44"
+  HREF="node6.html">Throwing flame</A>
+<LI><A NAME="tex2html45"
+  HREF="node7.html">Eating food</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html46"
+  HREF="node8.html">The Feeb</A>
+<UL>
+<LI><A NAME="tex2html47"
+  HREF="node9.html">Possible decisions</A>
+<LI><A NAME="tex2html48"
+  HREF="node10.html">Information available</A>
+<LI><A NAME="tex2html49"
+  HREF="node15.html">Extra functions provided</A>
+<LI><A NAME="tex2html50"
+  HREF="node16.html">Graphics</A>
+<LI><A NAME="tex2html51"
+  HREF="node17.html">Starting the game</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html52"
+  HREF="node18.html">Contests</A>
+<UL>
+<LI><A NAME="tex2html53"
+  HREF="node19.html">Map</A>
+<LI><A NAME="tex2html54"
+  HREF="node20.html">Timing</A>
+<LI><A NAME="tex2html55"
+  HREF="node21.html">Sense of location</A>
+<LI><A NAME="tex2html56"
+  HREF="node22.html">Changing the rules</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html57"
+  HREF="node23.html">Reference</A>
+</UL>
+<!--End of Table of Contents-->
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node10.html
==============================================================================
--- (empty file)
+++ feebs/node10.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Information available</TITLE>
+<META NAME="description" CONTENT="Information available">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node15.html">
+<LINK REL="previous" HREF="node9.html">
+<LINK REL="up" HREF="node8.html">
+<LINK REL="next" HREF="node11.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html173"
+  HREF="node11.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html169"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html163"
+  HREF="node9.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html171"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html174"
+  HREF="node11.html">Status</A>
+<B> Up:</B> <A NAME="tex2html170"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html164"
+  HREF="node9.html">Possible decisions</A>
+   <B>  <A NAME="tex2html172"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00042000000000000000">
+Information available</A>
+</H2>
+
+<P>
+The brain of a feeb mus take five arguments; I'll call them <I><I>status</I></I>,
+<I><I>proximity</I></I>, <I><I>vision</I></I>, <I><I>vision-left</I></I>
+and <I><I>vision-right</I></I>.
+
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
+<UL>
+<LI><A NAME="tex2html175"
+  HREF="node11.html">Status</A>
+<LI><A NAME="tex2html176"
+  HREF="node12.html">Proximity and vision</A>
+<LI><A NAME="tex2html177"
+  HREF="node13.html">Feebs and fireballs images</A>
+<LI><A NAME="tex2html178"
+  HREF="node14.html">Vision-left and vision-right</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node11.html
==============================================================================
--- (empty file)
+++ feebs/node11.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,193 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Status</TITLE>
+<META NAME="description" CONTENT="Status">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node12.html">
+<LINK REL="previous" HREF="node10.html">
+<LINK REL="up" HREF="node10.html">
+<LINK REL="next" HREF="node12.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html189"
+  HREF="node12.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html185"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html179"
+  HREF="node10.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html187"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html190"
+  HREF="node12.html">Proximity and vision</A>
+<B> Up:</B> <A NAME="tex2html186"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html180"
+  HREF="node10.html">Information available</A>
+   <B>  <A NAME="tex2html188"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H3><A NAME="SECTION00042100000000000000">
+Status</A>
+</H3>
+
+<P>
+Every time the brain is called, it receives some useful information
+through <I><B>status</B></I>.
+
+<P>
+The structure <I><B>status</B></I> keeps information about the
+feeb itself. Also it has information of the previous movement of the
+feeb. To access them, one must call:
+
+<P>
+
+<UL>
+<LI>[<I><B>(name</B></I><I><I> status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+name of the feeb.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(facing </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Where
+the feeb is facing, one of the constants provided: <I><B>north</B></I>,
+<I><B>south</B></I>, <I><B>east</B></I> or <I><B>west</B></I>,
+wich are 0, 1, 2 and 3 respectivelly.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(x-position </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+horizontal position of the feeb, increasing to east. If <I><B>*sense-location*</B></I>
+is nil, it returns nil instead.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(y-position </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+vertical position of the feeb, increasing to north. If <I><B>*sense-location*</B></I>
+is nil, it returns nil instead.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(peeking </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+If
+it is <I><B>:left</B></I> or <I><B>:right</B></I>, it means
+that the current <I><I>vision</I></I> provided is result of a previous
+<I><B>:peek-left</B></I> or <I><B>:peek-right</B></I> command
+of the same feeb. Otherwise, it is <I><B>nil</B></I>.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Indicates
+the amount of valid entries in <I><I>vision</I></I>. It actually
+means that <I><B>(aref </B></I><I><I>vision </I></I><I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>))</B></I>
+will return <I><B>:rock</B></I>.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(ready-to-fire </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+<I><B>T</B></I>
+indicates that the feeb is ready to fire. <I><B>Nil</B></I> indicates
+it is not.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(aborted</B></I><I><I> status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Related
+with timing. Returns <I><B>T</B></I> if the last move of feeb
+was aborted because of speed.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(last-move </B></I><I><I>status</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+feeb's previous move, or <I><B>:dead</B></I> if it has just reincarnated.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+</UL>
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html189"
+  HREF="node12.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html185"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html179"
+  HREF="node10.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html187"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html190"
+  HREF="node12.html">Proximity and vision</A>
+<B> Up:</B> <A NAME="tex2html186"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html180"
+  HREF="node10.html">Information available</A>
+   <B>  <A NAME="tex2html188"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node12.html
==============================================================================
--- (empty file)
+++ feebs/node12.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Proximity and vision</TITLE>
+<META NAME="description" CONTENT="Proximity and vision">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node13.html">
+<LINK REL="previous" HREF="node11.html">
+<LINK REL="up" HREF="node10.html">
+<LINK REL="next" HREF="node13.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html201"
+  HREF="node13.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html197"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html191"
+  HREF="node11.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html199"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html202"
+  HREF="node13.html">Feebs and fireballs images</A>
+<B> Up:</B> <A NAME="tex2html198"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html192"
+  HREF="node11.html">Status</A>
+   <B>  <A NAME="tex2html200"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H3><A NAME="SECTION00042200000000000000">
+Proximity and vision</A>
+</H3>
+
+<P>
+The brain receives also information about what is near the feeb and
+what the feeb sees.
+
+<P>
+The structure <I><I>proximity</I></I> has the contents of the squares
+near the feeb, with these fields:
+
+<P>
+
+<UL>
+<LI>[<I><B>(my-square </B></I><I><I>proximity</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Contents
+of the feeb's current square.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(left-square </B></I><I><I>proximity</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Contents
+of the right square of the feeb.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(right-square </B></I><I><I>proximity</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Contents
+of the left square of the feeb.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(rear-square</B></I><I><I> proximity</I></I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Contents
+of the square behind the feeb.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[The] vector <I><I>vision</I></I> has the contents of the squares
+that are in front of the feeb. For example, <I><B>(aref </B></I><I><I>vision </I></I><I>0</I><I><B>)</B></I>
+will return the contents of the square in front of the feeb, <I><B>(aref </B></I><I><I>vision </I></I><I>1</I><I><B>)</B></I>
+will return the contents of the next square, and so on. As said before,
+<I><B>(aref </B></I><I><I>vision </I></I><I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>))</B></I>
+will be the first :rock encountered. All subsequents square, like
+<I><B>(aref </B></I><I><I>vision </I></I><I><B>(+ </B></I><I>1 </I><I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>)))</B></I>,
+will be garbage and should not be used.
+</LI>
+</UL>The contents of one square returned by any of these calls is either
+:rock or a list of elements, or maybe <I><B>nil</B></I> if the
+square is empty. Each element of the square is one of these:
+
+<P>
+
+<UL>
+<LI><B>Feeb image.</B> One can call <I><B>(feeb-image-p </B></I><I>element</I><I><B>)</B></I>
+to see if element is a feeb image. 
+</LI>
+<LI><B>Fireball image.</B> One can call <I><B>(fireball-image-p </B></I><I>element</I><I><B>)</B></I>
+to check if element is a fireball image. 
+</LI>
+<LI><I><B>:carcass</B></I>. If there is a <I><B>:carcass</B></I>
+in the square of the feeb (i.e. in <I><B>(my-square </B></I><I><I>proximity</I></I><I><B>)</B></I>),
+the call <I><B>:eat-carcass</B></I> will make the feeb eat it. 
+</LI>
+<LI><I><B>:mushroom</B></I>. Analogous to <I><B>:carcass</B></I>.
+A mushroom appears randomly in places (mushroom patchs) previouly
+marked in the map. 
+</LI>
+</UL>
+
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html201"
+  HREF="node13.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html197"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html191"
+  HREF="node11.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html199"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html202"
+  HREF="node13.html">Feebs and fireballs images</A>
+<B> Up:</B> <A NAME="tex2html198"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html192"
+  HREF="node11.html">Status</A>
+   <B>  <A NAME="tex2html200"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node13.html
==============================================================================
--- (empty file)
+++ feebs/node13.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Feebs and fireballs images</TITLE>
+<META NAME="description" CONTENT="Feebs and fireballs images">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node14.html">
+<LINK REL="previous" HREF="node12.html">
+<LINK REL="up" HREF="node10.html">
+<LINK REL="next" HREF="node14.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html213"
+  HREF="node14.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html209"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html203"
+  HREF="node12.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html211"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html214"
+  HREF="node14.html">Vision-left and vision-right</A>
+<B> Up:</B> <A NAME="tex2html210"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html204"
+  HREF="node12.html">Proximity and vision</A>
+   <B>  <A NAME="tex2html212"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H3><A NAME="SECTION00042300000000000000">
+Feebs and fireballs images</A>
+</H3>
+
+<P>
+Both fireballs and feebs that are given to the brain function are
+not the real ones, but just images with contents that the brain function
+can access.
+
+<P>
+These are the fields available:
+
+<P>
+
+<UL>
+<LI>[<I><B>(feeb-image-name</B></I><I> feeb-image</I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+name of the feeb. Maybe you can know it's weakpoints.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(feeb-image-facing </B></I><I>feeb-image</I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+facing of the feeb. This way the brain function can see if the feeb-image
+either sees it or not.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(feeb-image-peeking </B></I><I>feeb-image</I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+Returns
+<I><B>:peek-left</B></I> or <I><B>:peek-right</B></I> if the
+feeb is peeking to (its) left or right, or <I><B>nil</B></I> if
+not.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+<LI>[<I><B>(fireball-image-direction </B></I><I>fireball-image</I><I><B>)</B></I>] <DIV ALIGN="LEFT">
+The
+direction that the fireball image is going to.
+</DIV>
+<P>
+<DIV ALIGN="LEFT">
+</DIV>
+</LI>
+</UL>
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node14.html
==============================================================================
--- (empty file)
+++ feebs/node14.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Vision-left and vision-right</TITLE>
+<META NAME="description" CONTENT="Vision-left and vision-right">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node13.html">
+<LINK REL="up" HREF="node10.html">
+<LINK REL="next" HREF="node15.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html223"
+  HREF="node15.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html219"
+  HREF="node10.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html215"
+  HREF="node13.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html221"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html224"
+  HREF="node15.html">Extra functions provided</A>
+<B> Up:</B> <A NAME="tex2html220"
+  HREF="node10.html">Information available</A>
+<B> Previous:</B> <A NAME="tex2html216"
+  HREF="node13.html">Feebs and fireballs images</A>
+   <B>  <A NAME="tex2html222"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H3><A NAME="SECTION00042400000000000000">
+Vision-left and vision-right</A>
+</H3>
+
+<P>
+<I><I>vision-left</I></I> and <I><I>vision-right</I></I> are vectors
+similar to vision, but they are less precise in the contents. Also
+their valid contents are limited by <I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>)</B></I>,
+so <I><B>(aref </B></I><I><I>vision-left </I></I><I><B>(line-of-sight </B></I><I><I>status</I></I><I><B>))</B></I>,
+for example, will return <I><B>:unknown</B></I>.
+
+<P>
+Note that feebs that are not peeking, mushrooms and carcasses are
+<I>not</I> be detected by these vectors. Also, if there is a feeb
+peeking to the opposite side, it won't be detected either. These are
+the possible returns of the elements in <I><B>vision-left</B></I>
+and <I><B>vision-right</B></I>:
+
+<P>
+
+<UL>
+<LI>[<I><B>:peek-letf</B></I>] This means that in that square there
+is a feeb peeking to (its) left. 
+</LI>
+<LI>[<I><B>:peek-right</B></I>] This means that in that square
+there is a feeb peeking to (its) right. 
+</LI>
+<LI>[<I><B>nil</B></I>] This square is empty. 
+</LI>
+<LI>[<I><B>:rock</B></I>] This square is just a wall. 
+</LI>
+</UL>
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node15.html
==============================================================================
--- (empty file)
+++ feebs/node15.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Extra functions provided</TITLE>
+<META NAME="description" CONTENT="Extra functions provided">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node16.html">
+<LINK REL="previous" HREF="node10.html">
+<LINK REL="up" HREF="node8.html">
+<LINK REL="next" HREF="node16.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html235"
+  HREF="node16.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html231"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html225"
+  HREF="node14.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html233"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html236"
+  HREF="node16.html">Graphics</A>
+<B> Up:</B> <A NAME="tex2html232"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html226"
+  HREF="node14.html">Vision-left and vision-right</A>
+   <B>  <A NAME="tex2html234"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00043000000000000000">
+Extra functions provided</A>
+</H2>
+
+<P>
+Before making the brain of your feeb, you might want to take a look
+at the Extra functions that are available at the end of the feebs.lisp
+file. The only thing you need so you can use them is to see their
+code and know what they do.
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node16.html
==============================================================================
--- (empty file)
+++ feebs/node16.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Graphics</TITLE>
+<META NAME="description" CONTENT="Graphics">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node17.html">
+<LINK REL="previous" HREF="node15.html">
+<LINK REL="up" HREF="node8.html">
+<LINK REL="next" HREF="node17.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html247"
+  HREF="node17.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html243"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html237"
+  HREF="node15.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html245"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html248"
+  HREF="node17.html">Starting the game</A>
+<B> Up:</B> <A NAME="tex2html244"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html238"
+  HREF="node15.html">Extra functions provided</A>
+   <B>  <A NAME="tex2html246"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00044000000000000000">
+Graphics</A>
+</H2>
+
+<P>
+With this version of the game, it's possible to choose the graphics
+of a feeb when creating it, so your feeb will be more personalized.
+
+<P>
+The graphic of a feeb is defined by an image file, which should have
+three colunms by eight lines of pictures of the same size. The four
+first lines must be the animations of the feeb walking up, left, down
+and right, respectively. The next four lines must be the pictures
+of the feeb flaming up, left, down and right, respectively. To see
+an example, see ``default-feeb.png''.
+
+<P>
+After creating the image file, you must call <I><B>(create-graphics</B></I><I> path-to-image-file</I><I><B>)</B></I>.
+If you now how to work with sdl surfaces in lispbuilder, you may use
+the function with a surface instead of a image file; or you can call
+<I><B>(create-graphics </B></I><I>path-to-image-file nil</I><I><B>)</B></I>
+if the surface should not be freed after the call. The result must
+be the third argument given to define-feeb.
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node17.html
==============================================================================
--- (empty file)
+++ feebs/node17.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Starting the game</TITLE>
+<META NAME="description" CONTENT="Starting the game">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node16.html">
+<LINK REL="up" HREF="node8.html">
+<LINK REL="next" HREF="node18.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html257"
+  HREF="node18.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html253"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html249"
+  HREF="node16.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html255"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html258"
+  HREF="node18.html">Contests</A>
+<B> Up:</B> <A NAME="tex2html254"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html250"
+  HREF="node16.html">Graphics</A>
+   <B>  <A NAME="tex2html256"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00045000000000000000">
+Starting the game</A>
+</H2>
+
+<P>
+The game loop is started by calling (feebs).
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node18.html
==============================================================================
--- (empty file)
+++ feebs/node18.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Contests</TITLE>
+<META NAME="description" CONTENT="Contests">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node23.html">
+<LINK REL="previous" HREF="node8.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node19.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html269"
+  HREF="node19.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html265"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html259"
+  HREF="node17.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html267"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html270"
+  HREF="node19.html">Map</A>
+<B> Up:</B> <A NAME="tex2html266"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html260"
+  HREF="node17.html">Starting the game</A>
+   <B>  <A NAME="tex2html268"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00050000000000000000">
+Contests</A>
+</H1>
+
+<P>
+I sugest that you see this chapter only after you have created at
+least a basic brain feeb, wich is better than the (simple) provided
+brain, and when you want to participate of a contest or a game with
+your friends.
+
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
+<UL>
+<LI><A NAME="tex2html271"
+  HREF="node19.html">Map</A>
+<LI><A NAME="tex2html272"
+  HREF="node20.html">Timing</A>
+<LI><A NAME="tex2html273"
+  HREF="node21.html">Sense of location</A>
+<LI><A NAME="tex2html274"
+  HREF="node22.html">Changing the rules</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node19.html
==============================================================================
--- (empty file)
+++ feebs/node19.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,130 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Map</TITLE>
+<META NAME="description" CONTENT="Map">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node20.html">
+<LINK REL="previous" HREF="node18.html">
+<LINK REL="up" HREF="node18.html">
+<LINK REL="next" HREF="node20.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html285"
+  HREF="node20.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html281"
+  HREF="node18.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html275"
+  HREF="node18.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html283"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html286"
+  HREF="node20.html">Timing</A>
+<B> Up:</B> <A NAME="tex2html282"
+  HREF="node18.html">Contests</A>
+<B> Previous:</B> <A NAME="tex2html276"
+  HREF="node18.html">Contests</A>
+   <B>  <A NAME="tex2html284"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00051000000000000000"></A><A NAME="sub:Map"></A>
+<BR>
+Map
+</H2>
+
+<P>
+It is possible to get the maze map during the game, but with only
+the corridors. Note that the function that gets the map is purposely
+a little slow, so, invoking it too many times in a contest that uses
+timing atributes is not a good idea; anyway, it is possible to invoke
+this function before defining the feeb, and store its value somewhere.
+Also note that the map returned does not have any information about
+what is really in the maze, but only the possible ways.
+
+<P>
+To get the map, one can call <I><B>(get-maze-map)</B></I>. This
+function will return <I><B>nil</B></I> if <I><B>*may-get-maze-p*</B></I>
+is also <I><B>nil</B></I>. Otherwise, the map returned is an array,
+so that calling <I><B>(aref</B></I><I> map x y</I><I><B>)</B></I>
+will get the contents in the euclidean position (x,y) . The contents
+of a cell could be one of these:
+
+<P>
+
+<UL>
+<LI>[<I><B>:mushroom-place</B></I>] A mushroom patch, i.e. when
+a mushroom is eaten it can come out here. 
+</LI>
+<LI>[<I><B>:feeb-entry-place</B></I>] A feeb entry, i.e. if a carcass
+rots a feeb can appear here. 
+</LI>
+<LI>[<I><B>:rock</B></I>] A wall. Feebs cannot come in this place. 
+</LI>
+<LI>[<I><B>nil</B></I>] An ``empty'' place, i.e. neither of
+the previous. 
+</LI>
+</UL>
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html285"
+  HREF="node20.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html281"
+  HREF="node18.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html275"
+  HREF="node18.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html283"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html286"
+  HREF="node20.html">Timing</A>
+<B> Up:</B> <A NAME="tex2html282"
+  HREF="node18.html">Contests</A>
+<B> Previous:</B> <A NAME="tex2html276"
+  HREF="node18.html">Contests</A>
+   <B>  <A NAME="tex2html284"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node2.html
==============================================================================
--- (empty file)
+++ feebs/node2.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Introduction</TITLE>
+<META NAME="description" CONTENT="Introduction">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node4.html">
+<LINK REL="previous" HREF="node1.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node3.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html68"
+  HREF="node3.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html64"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html58"
+  HREF="node1.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html66"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html69"
+  HREF="node3.html">Changes from Planet of</A>
+<B> Up:</B> <A NAME="tex2html65"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html59"
+  HREF="node1.html">Contents</A>
+   <B>  <A NAME="tex2html67"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00020000000000000000">
+Introduction</A>
+</H1>
+
+<P>
+The Feebs are intelligent and hostile creatures that live inside maze
+tunnels. They also have no mercy with each other, so they frequently
+throw a letal flame from through their mouth, and, after that, they
+can eat the carcass left. But throwing flames have an energy cost,
+so they must keep tracking for food.
+
+<P>
+This game is intended to help lisp newbies (or maybe a little more
+advanced lispers) to learn lisp. A player must create a function that
+receives what his/her feeb is seeing and feeling, and returns what
+it will do next. To create the better feeb, one can create variables
+to store data from previous moves (or not), and can also use all the
+power of lisp to improve his/her creature.
+
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
+<UL>
+<LI><A NAME="tex2html70"
+  HREF="node3.html">Changes from <I>Planet of the Feebs</I></A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node20.html
==============================================================================
--- (empty file)
+++ feebs/node20.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Timing</TITLE>
+<META NAME="description" CONTENT="Timing">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node21.html">
+<LINK REL="previous" HREF="node19.html">
+<LINK REL="up" HREF="node18.html">
+<LINK REL="next" HREF="node21.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html297"
+  HREF="node21.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html293"
+  HREF="node18.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html287"
+  HREF="node19.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html295"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html298"
+  HREF="node21.html">Sense of location</A>
+<B> Up:</B> <A NAME="tex2html294"
+  HREF="node18.html">Contests</A>
+<B> Previous:</B> <A NAME="tex2html288"
+  HREF="node19.html">Map</A>
+   <B>  <A NAME="tex2html296"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00052000000000000000">
+Timing</A>
+</H2>
+
+<P>
+There are also some timing atributes that can be given to the game.
+If the feeb takes too long to make a decision, there is more probability
+of its command to be aborted.
+
+<P>
+To make this available, someone must set these:
+
+<P>
+
+<UL>
+<LI>[<I><B>*slow-feeb-noop-switch*</B></I>] If is non-nil,
+there is a possibility that the move of a feeb is aborted according
+to its function time. Not applied to the human controlled feeb. 
+</LI>
+<LI>[<I><B>*slow-feeb-noop-factor*</B></I>] The probability
+of the feeb to abort will be this factor times the amount of time
+the feeb takes to have a decision, divided for the total time taken
+by all the feebs in the current turn. 
+</LI>
+</UL>
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node21.html
==============================================================================
--- (empty file)
+++ feebs/node21.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Sense of location</TITLE>
+<META NAME="description" CONTENT="Sense of location">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node22.html">
+<LINK REL="previous" HREF="node20.html">
+<LINK REL="up" HREF="node18.html">
+<LINK REL="next" HREF="node22.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html309"
+  HREF="node22.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html305"
+  HREF="node18.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html299"
+  HREF="node20.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html307"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html310"
+  HREF="node22.html">Changing the rules</A>
+<B> Up:</B> <A NAME="tex2html306"
+  HREF="node18.html">Contests</A>
+<B> Previous:</B> <A NAME="tex2html300"
+  HREF="node20.html">Timing</A>
+   <B>  <A NAME="tex2html308"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00053000000000000000">
+Sense of location</A>
+</H2>
+
+<P>
+Some accessors related to position and orientation of the feeb can
+be turned off.
+
+<P>
+These are the parameters:
+
+<P>
+
+<UL>
+<LI>[<I><B>*sense-location-p*</B></I>] Tells if the actual
+position of the feeb can be determinated accessing <I><B>x-position</B></I>
+and <I><B>y-position</B></I>. 
+</LI>
+</UL>
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node22.html
==============================================================================
--- (empty file)
+++ feebs/node22.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Changing the rules</TITLE>
+<META NAME="description" CONTENT="Changing the rules">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node21.html">
+<LINK REL="up" HREF="node18.html">
+<LINK REL="next" HREF="node23.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html319"
+  HREF="node23.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html315"
+  HREF="node18.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html311"
+  HREF="node21.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html317"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html320"
+  HREF="node23.html">Reference</A>
+<B> Up:</B> <A NAME="tex2html316"
+  HREF="node18.html">Contests</A>
+<B> Previous:</B> <A NAME="tex2html312"
+  HREF="node21.html">Sense of location</A>
+   <B>  <A NAME="tex2html318"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00054000000000000000">
+Changing the rules</A>
+</H2>
+
+<P>
+To change the rules of the contest, they must be changed before the
+feebs are defined, because in a feeb definition it could use the values
+of the variables to make a global strategy, and change the strategies
+after this could not be fair.
+
+<P>
+All the parameters that can be listed using <I><B>(list-parameter-settings)</B></I>
+can be changed using setf. Also, they all have documentation about
+themselves, so feel free to use <I><B>(documentation </B></I><I>parameter 'variable</I><I><B>)</B></I>
+and see what each parameter does. Documentation is available to external
+functions too.
+
+<P>
+It is possible to change the layout of the map by calling <I><B>(change-layout</B></I><I> new-layout</I><I><B>)</B></I>.
+There are a few predefined mazes that are <I><B>*maze-0*</B></I>
+throw <I><B>*maze-5*</B></I>. If you want to create a new
+map, take the template (commented) inside the same file, or create
+maybe a bigger template (of any size, because the values of <I><B>*maze-x-size*</B></I>
+and <I><B>*maze-y-size*</B></I> will be changed accordingly).
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node23.html
==============================================================================
--- (empty file)
+++ feebs/node23.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Reference</TITLE>
+<META NAME="description" CONTENT="Reference">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node24.html">
+<LINK REL="previous" HREF="node18.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node24.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html331"
+  HREF="node24.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html327"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html321"
+  HREF="node22.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html329"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html332"
+  HREF="node24.html">About this document ...</A>
+<B> Up:</B> <A NAME="tex2html328"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html322"
+  HREF="node22.html">Changing the rules</A>
+   <B>  <A NAME="tex2html330"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00060000000000000000">
+Reference</A>
+</H1>
+
+<P>
+<BLOCKQUOTE>
+Fahlman, S. E. <B><I>Planet of the Feebs -</I></B> <I>A Somewhat
+Educational Game.</I> ftp://ftp.csl.sri.com/pub/users/gilham/feebs/feebs.tex. 
+
+</BLOCKQUOTE>
+
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node24.html
==============================================================================
--- (empty file)
+++ feebs/node24.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>About this document ...</TITLE>
+<META NAME="description" CONTENT="About this document ...">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node23.html">
+<LINK REL="up" HREF="feebs.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next_g.png"> 
+<A NAME="tex2html337"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html333"
+  HREF="node23.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html339"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Up:</B> <A NAME="tex2html338"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html334"
+  HREF="node23.html">Reference</A>
+   <B>  <A NAME="tex2html340"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00070000000000000000">
+About this document ...</A>
+</H1>
+ <STRONG><B><FONT SIZE="+3">The Feebs War</FONT></B></STRONG><P>
+This document was generated using the
+<A HREF="http://www.latex2html.org/"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 2002-2-1 (1.71)
+<P>
+Copyright © 1993, 1994, 1995, 1996,
+<A HREF="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos</A>, 
+Computer Based Learning Unit, University of Leeds.
+<BR>
+Copyright © 1997, 1998, 1999,
+<A HREF="http://www.maths.mq.edu.au/~ross/">Ross Moore</A>, 
+Mathematics Department, Macquarie University, Sydney.
+<P>
+The command line arguments were: <BR>
+ <STRONG>latex2html</STRONG> <TT><A NAME="tex2html1"
+  HREF="../feebs.tex">feebs.tex</A></TT>
+<P>
+The translation was initiated by  on 2007-12-19
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node3.html
==============================================================================
--- (empty file)
+++ feebs/node3.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Changes from Planet of the Feebs</TITLE>
+<META NAME="description" CONTENT="Changes from Planet of the Feebs">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node2.html">
+<LINK REL="up" HREF="node2.html">
+<LINK REL="next" HREF="node4.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html79"
+  HREF="node4.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html75"
+  HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html71"
+  HREF="node2.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html77"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html80"
+  HREF="node4.html">The Game</A>
+<B> Up:</B> <A NAME="tex2html76"
+  HREF="node2.html">Introduction</A>
+<B> Previous:</B> <A NAME="tex2html72"
+  HREF="node2.html">Introduction</A>
+   <B>  <A NAME="tex2html78"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00021000000000000000">
+Changes from <I>Planet of the Feebs</I></A>
+</H2>
+
+<P>
+Many changes were made from the original game, but, if you have any
+feeb definition and you want to use it, it should be easy to adapt
+the brain function to the new rules.
+
+<P>
+The main reason of this project is that <I>Planet of the Feebs</I>
+is really interesting for (not just) newbies to learn lisp, but the
+difficulties to install, unportability and the ausence of competitors
+make it difficult to someone to be interested in making a feeb. So,
+I hope that making these adjustments and maybe creating some contests
+over the web make people be more interested in learning lisp.
+
+<P>
+So, these are (some of) the changes:
+
+<P>
+
+<UL>
+<LI>The graphics are not based on X Window Sistem anymore, but on PAL,
+and there are no CMUCL's event handler. This way, the code is more
+portable and graphics can be improved without those hundreds of lines
+that the original version has. Just creating some .bmp or .jpg files
+of a feeb and your feeb is much more personalized! 
+</LI>
+<LI>Every element of the map (except walls) is a list, so the brain of
+a feeb doesn't need to test all the time if the element is an atom
+or a list (wich, in my opinion, is really boring, unlispy and unnecessary
+in this case). That was only a reason to duplicate code and work,
+adding no results at all...
+</LI>
+<LI>Many functions and variables are changed and others were added. 
+</LI>
+<LI>Someone watching the game can control a Feeb with the keyboard, if
+he/she wants to, and say when the game must finish.
+</LI>
+<LI>This document is more objective than the one provided with <I>Planet
+of the Feebs</I>, and is fully compatible with the code. This way it
+is easier to search for some information.
+</LI>
+</UL>
+
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html79"
+  HREF="node4.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html75"
+  HREF="node2.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html71"
+  HREF="node2.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html77"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html80"
+  HREF="node4.html">The Game</A>
+<B> Up:</B> <A NAME="tex2html76"
+  HREF="node2.html">Introduction</A>
+<B> Previous:</B> <A NAME="tex2html72"
+  HREF="node2.html">Introduction</A>
+   <B>  <A NAME="tex2html78"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node4.html
==============================================================================
--- (empty file)
+++ feebs/node4.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>The Game</TITLE>
+<META NAME="description" CONTENT="The Game">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node8.html">
+<LINK REL="previous" HREF="node2.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node5.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html91"
+  HREF="node5.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html87"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html81"
+  HREF="node3.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html89"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html92"
+  HREF="node5.html">Overview</A>
+<B> Up:</B> <A NAME="tex2html88"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html82"
+  HREF="node3.html">Changes from Planet of</A>
+   <B>  <A NAME="tex2html90"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00030000000000000000">
+The Game</A>
+</H1>
+
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
+<UL>
+<LI><A NAME="tex2html93"
+  HREF="node5.html">Overview</A>
+<LI><A NAME="tex2html94"
+  HREF="node6.html">Throwing flame</A>
+<LI><A NAME="tex2html95"
+  HREF="node7.html">Eating food</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node5.html
==============================================================================
--- (empty file)
+++ feebs/node5.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Overview</TITLE>
+<META NAME="description" CONTENT="Overview">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node6.html">
+<LINK REL="previous" HREF="node4.html">
+<LINK REL="up" HREF="node4.html">
+<LINK REL="next" HREF="node6.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html106"
+  HREF="node6.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html102"
+  HREF="node4.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html96"
+  HREF="node4.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html104"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html107"
+  HREF="node6.html">Throwing flame</A>
+<B> Up:</B> <A NAME="tex2html103"
+  HREF="node4.html">The Game</A>
+<B> Previous:</B> <A NAME="tex2html97"
+  HREF="node4.html">The Game</A>
+   <B>  <A NAME="tex2html105"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00031000000000000000">
+Overview</A>
+</H2>
+
+<P>
+Your feeb's objective is to survive and kill other feebs. It is inside
+a maze of tunnels. Every turn, all feebs lose one unit of energy,
+and maybe starves. Your feeb is able to move forward, turn left, right
+or around, flame, peek around a corner, eat something or just wait.
+After all feebs move, the flames thrown before also move (or dissipate),
+carcasses may rot and mushrooms may grow, accordingly to some rules.
+
+<P>
+To see what values are taken, one can use <I><B>(list-parameter-settings)</B></I>.
+Using <I><B>setf</B></I> gives the possibility to change them
+and <I><B>documentation</B></I> can be used to know them. Just
+remember that every probability must be a rational number (like 1/2).
+These parameters are just for one to know how the game is going to
+be, but in the begining there is no need to explicitly use them when
+creating the brain of a feeb.
+
+<P>
+These are some global parameters:
+
+<P>
+
+<UL>
+<LI>[<I><B>*game-length*</B></I>] Number of turns the game
+will last, or nil if there is a human player. 
+</LI>
+<LI>[<I><B>*points-for-killing*</B></I>] How many points some
+feeb earn for killing someone. 
+</LI>
+<LI>[<I><B>*points-for-dying*</B></I>] How many points some
+feeb earn for dying (usually negative). 
+</LI>
+<LI>[<I><B>*maze-x-size*</B></I>] Horizontal size of the maze. 
+</LI>
+<LI>[<I><B>*maze-y-size*</B></I>] Vertical size of the maze. 
+</LI>
+<LI>[<I><B>(get-maze-map)</B></I>] This command can be used to
+get the map (see section <A HREF="node19.html#sub:Map"><IMG  ALIGN="BOTTOM" BORDER="1" ALT="[*]"
+ SRC="file:/usr/lib/latex2html/icons/crossref.png"></A>). 
+</LI>
+</UL>
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html106"
+  HREF="node6.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html102"
+  HREF="node4.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html96"
+  HREF="node4.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html104"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html107"
+  HREF="node6.html">Throwing flame</A>
+<B> Up:</B> <A NAME="tex2html103"
+  HREF="node4.html">The Game</A>
+<B> Previous:</B> <A NAME="tex2html97"
+  HREF="node4.html">The Game</A>
+   <B>  <A NAME="tex2html105"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node6.html
==============================================================================
--- (empty file)
+++ feebs/node6.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Throwing flame</TITLE>
+<META NAME="description" CONTENT="Throwing flame">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node7.html">
+<LINK REL="previous" HREF="node5.html">
+<LINK REL="up" HREF="node4.html">
+<LINK REL="next" HREF="node7.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html118"
+  HREF="node7.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html114"
+  HREF="node4.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html108"
+  HREF="node5.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html116"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html119"
+  HREF="node7.html">Eating food</A>
+<B> Up:</B> <A NAME="tex2html115"
+  HREF="node4.html">The Game</A>
+<B> Previous:</B> <A NAME="tex2html109"
+  HREF="node5.html">Overview</A>
+   <B>  <A NAME="tex2html117"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00032000000000000000">
+Throwing flame</A>
+</H2>
+
+<P>
+If a feeb decides to throw a flame, and if it is prepared to, it will
+spend energy, and the next turn there will be a flame in the square
+in front of the feeb. For a few turns, the feeb will not be able to
+throw flames. The turn after the feeb throws the flame, it is able
+to see its own flame exactly in front of it, so it shouldn't move
+forward. Each turn, the flame moves forward destroing mushrooms and
+killing feebs it encounters, transforming them into carcass. If there
+is a wall, the flame can reflect, and will turn 180 degrees.
+
+<P>
+Once a feeb is killed, in it's place in the maze there will appear
+a carcass. The feeb goes to the end of the killed feebs line. Whenever
+a carcass rots, the first feeb in line will reincarnate. So, dying
+is not so terrible.
+
+<P>
+These are the parameters related to flames:
+
+<P>
+
+<UL>
+<LI>[<I><B>*flame-energy*</B></I>] Amount of energy lost after
+throwing a flame. 
+</LI>
+<LI>[<I><B>*fireball-guaranteed-lifetime*</B></I>] Number of
+turns that a fireball is guaranteed not to dissipate, unless it encounters
+a wall.
+</LI>
+<LI>[<I><B>*fireball-dissipation-probability*</B></I>] Probability
+of the flame to dissipate each turn after the apropriate time.
+</LI>
+<LI>[<I><B>*fireball-reflection-probability*</B></I>] Probability
+of the flame to reflect when encountering a wall. 
+</LI>
+<LI>[<I><B>*flame-no-recovery-time*</B></I>] Number of turns
+that a feeb cannot fire.
+</LI>
+<LI>[<I><B>*flame-recovery-probability*</B></I>] Probability
+of the feeb to recover the hability to throw a flame, after the apropriate
+time.
+</LI>
+</UL>
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html118"
+  HREF="node7.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html114"
+  HREF="node4.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html108"
+  HREF="node5.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html116"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html119"
+  HREF="node7.html">Eating food</A>
+<B> Up:</B> <A NAME="tex2html115"
+  HREF="node4.html">The Game</A>
+<B> Previous:</B> <A NAME="tex2html109"
+  HREF="node5.html">Overview</A>
+   <B>  <A NAME="tex2html117"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node7.html
==============================================================================
--- (empty file)
+++ feebs/node7.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Eating food</TITLE>
+<META NAME="description" CONTENT="Eating food">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="previous" HREF="node6.html">
+<LINK REL="up" HREF="node4.html">
+<LINK REL="next" HREF="node8.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html128"
+  HREF="node8.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html124"
+  HREF="node4.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html120"
+  HREF="node6.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html126"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html129"
+  HREF="node8.html">The Feeb</A>
+<B> Up:</B> <A NAME="tex2html125"
+  HREF="node4.html">The Game</A>
+<B> Previous:</B> <A NAME="tex2html121"
+  HREF="node6.html">Throwing flame</A>
+   <B>  <A NAME="tex2html127"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00033000000000000000">
+Eating food</A>
+</H2>
+
+<P>
+There are two kinds of food, carcasses and mushrooms. Carcasses usually
+give less energy than mushrooms, and may rot, but, while it does not
+rot, a feeb can feed as long as it wishes. By eating food, the feeb
+will be able to recover energy, wich is important because, if a feeb
+stays with 0 or less units of energy, it starves.
+
+<P>
+These are the quantities:
+
+<P>
+
+<UL>
+<LI>[<I><B>*mushroom-energy*</B></I>] Amount of energy recovered
+when the feeb eats a mushroom. 
+</LI>
+<LI>[<I><B>*carcass-energy*</B></I>] Amount of energy recovered
+each turn that the feeb eats a carcass. 
+</LI>
+<LI>[<I><B>*carcass-guaranteed-lifetime*</B></I>] Number of
+turns that a carcass will surely stay there. After these turns, it
+can rot, depending on probabilities. 
+</LI>
+<LI>[<I><B>*carcass-rot-probability*</B></I>] Probability of
+the carcass to rot, after the apropriate time. 
+</LI>
+<LI>[<I><B>*maximum-energy*</B></I>] Maximum amount of energy
+that a feeb can have eating. 
+</LI>
+<LI>[<I><B>*starting-energy*</B></I>] Amount of energy a feeb
+has when it reincarnates. 
+</LI>
+<LI>[<I><B>*number-of-mushrooms*</B></I>] Quantity of mushrooms
+that exist in the maze. 
+</LI>
+</UL>
+<P>
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node8.html
==============================================================================
--- (empty file)
+++ feebs/node8.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>The Feeb</TITLE>
+<META NAME="description" CONTENT="The Feeb">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node18.html">
+<LINK REL="previous" HREF="node4.html">
+<LINK REL="up" HREF="feebs.html">
+<LINK REL="next" HREF="node9.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html140"
+  HREF="node9.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html136"
+  HREF="feebs.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html130"
+  HREF="node7.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html138"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html141"
+  HREF="node9.html">Possible decisions</A>
+<B> Up:</B> <A NAME="tex2html137"
+  HREF="feebs.html">The Feebs War</A>
+<B> Previous:</B> <A NAME="tex2html131"
+  HREF="node7.html">Eating food</A>
+   <B>  <A NAME="tex2html139"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00040000000000000000">
+The Feeb</A>
+</H1>
+
+<P>
+A feeb needs four things: a name, a brain, an initialize function
+(optional) and a set of graphics (optional).
+
+<P>
+
+<UL>
+<LI>The name, a string. 
+</LI>
+<LI>The brain is a function that decides what the feeb will do next, based
+on what it is seeing and feeling. 
+</LI>
+<LI>The initializer is invoked when the game is about to start, so it
+can analyze the map, global parameters, and so on. 
+</LI>
+<LI>The set of graphics is an image file (of format BMP, JPEG, PNG, and
+any others that supported by SDL_image). 
+</LI>
+</UL>
+One can create a feeb calling <I><B>(define-feeb </B></I><I>name brain </I><I><B>:initializer</B></I><I> prepare </I><I><B>:graphics</B></I><I> graphics</I><I><B>)</B></I>.
+If name is already used, a warning will be signaled, and the old feeb
+will be substituted. Calling <I><B>(list-of-feebs)</B></I> will
+return the list of the feebs (names only) that will be defined when
+the game begins. <I><B>(delete-feeb</B></I><I> name</I><I><B>)</B></I>
+will delete the feeb with this name from this list, and <I><B>(delete-all-feebs)</B></I>
+will clear it.
+
+<P>
+<BR><HR>
+<!--Table of Child-Links-->
+<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
+<UL>
+<LI><A NAME="tex2html142"
+  HREF="node9.html">Possible decisions</A>
+<LI><A NAME="tex2html143"
+  HREF="node10.html">Information available</A>
+<UL>
+<LI><A NAME="tex2html144"
+  HREF="node11.html">Status</A>
+<LI><A NAME="tex2html145"
+  HREF="node12.html">Proximity and vision</A>
+<LI><A NAME="tex2html146"
+  HREF="node13.html">Feebs and fireballs images</A>
+<LI><A NAME="tex2html147"
+  HREF="node14.html">Vision-left and vision-right</A>
+</UL>
+<BR>
+<LI><A NAME="tex2html148"
+  HREF="node15.html">Extra functions provided</A>
+<LI><A NAME="tex2html149"
+  HREF="node16.html">Graphics</A>
+<LI><A NAME="tex2html150"
+  HREF="node17.html">Starting the game</A>
+</UL>
+<!--End of Table of Child-Links-->
+<BR><HR>
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: feebs/node9.html
==============================================================================
--- (empty file)
+++ feebs/node9.html	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+
+<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
+original version by:  Nikos Drakos, CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Possible decisions</TITLE>
+<META NAME="description" CONTENT="Possible decisions">
+<META NAME="keywords" CONTENT="feebs">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="feebs.css">
+
+<LINK REL="next" HREF="node10.html">
+<LINK REL="previous" HREF="node8.html">
+<LINK REL="up" HREF="node8.html">
+<LINK REL="next" HREF="node10.html">
+</HEAD>
+
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html161"
+  HREF="node10.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html157"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html151"
+  HREF="node8.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html159"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html162"
+  HREF="node10.html">Information available</A>
+<B> Up:</B> <A NAME="tex2html158"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html152"
+  HREF="node8.html">The Feeb</A>
+   <B>  <A NAME="tex2html160"
+  HREF="node1.html">Contents</A></B> 
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H2><A NAME="SECTION00041000000000000000">
+Possible decisions</A>
+</H2>
+
+<P>
+After processing the information available, the brain will take a
+decision. If this decision is not one of the decisions listed down,
+a warning will be signaled, and the result will be like <I><B>:wait</B></I>.
+Then, if someone are testing a brain function, he or she will be able
+to know if something goes wrong.
+
+<P>
+The possible values that the brain function can return are these:
+
+<P>
+
+<UL>
+<LI>[<I><B>:move-forward</B></I>] Move one square forward, unless
+there is a wall in front of the feeb. 
+</LI>
+<LI>[<I><B>:turn-left</B></I>] Turn 90 degrees to the left. 
+</LI>
+<LI>[<I><B>:turn-right</B></I>] Turn 90 degrees to the right. 
+</LI>
+<LI>[<I><B>:turn-around</B></I>] Turn 180 degrees. 
+</LI>
+<LI>[<I><B>:flame</B></I>] Throw a flame. The flame will be created
+next turn in the front square of the feeb. 
+</LI>
+<LI>[<I><B>:wait</B></I>] Do nothing in this turn. 
+</LI>
+<LI>[<I><B>:peek-left</B></I>] Peek to the left around a corner.
+The creature does note actually move, but, in the next turn, the creature
+will have the same vision that it would have if he had moved one step
+foward and turned left. This is used so a feeb can analize a corridor
+before trespassing it. 
+</LI>
+<LI>[<I><B>:peek-right</B></I>] Peek to the right around a corner,
+analogous of <I><B>:peek-left</B></I>. 
+</LI>
+<LI>[<I><B>:eat-carcass</B></I>] Eat a carcass if there is any
+available in the feeb's square. The amount of <I><B>*carcass-energy*</B></I>
+is restored to the feeb's energy. 
+</LI>
+<LI>[<I><B>:eat-mushroom</B></I>] Eat a mushroom if there is any
+available in the feeb's square. The amount of <I><B>*mushroom-energy*</B></I>
+is restored to the feeb's energy. 
+</LI>
+</UL>
+<P>
+<HR>
+<!--Navigation Panel-->
+<A NAME="tex2html161"
+  HREF="node10.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="file:/usr/lib/latex2html/icons/next.png"></A> 
+<A NAME="tex2html157"
+  HREF="node8.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="file:/usr/lib/latex2html/icons/up.png"></A> 
+<A NAME="tex2html151"
+  HREF="node8.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="file:/usr/lib/latex2html/icons/prev.png"></A> 
+<A NAME="tex2html159"
+  HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="file:/usr/lib/latex2html/icons/contents.png"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html162"
+  HREF="node10.html">Information available</A>
+<B> Up:</B> <A NAME="tex2html158"
+  HREF="node8.html">The Feeb</A>
+<B> Previous:</B> <A NAME="tex2html152"
+  HREF="node8.html">The Feeb</A>
+   <B>  <A NAME="tex2html160"
+  HREF="node1.html">Contents</A></B> 
+<!--End of Navigation Panel-->
+<ADDRESS>
+
+2007-12-19
+</ADDRESS>
+</BODY>
+</HTML>

Added: graphics.lisp
==============================================================================
--- (empty file)
+++ graphics.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,98 @@
+;;; -*- Common Lisp -*-
+
+#|  Copyright (c) 2007 Gustavo Henrique Milaré
+
+    This file is part of The Feebs War.
+
+    The Feebs War is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    The Feebs War is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+|#
+
+(in-package :feebs)
+
+(defun print-direction (dir)
+  (case dir
+    (0 #\N)
+    (1 #\E)
+    (2 #\S)
+    (3 #\W)))
+
+(defun print-map ()
+  (dotimes (y *maze-y-size*)
+    (dotimes (x *maze-x-size*)
+      (let ((elt (aref *maze* x y)))
+	(apply 'format t
+	       (cond
+		 ((wallp elt) 
+		  (list " XX"))
+		 ((feeb-image-p (car elt))
+		  (list "F~1d~a"
+			(feeb-id (feeb-image-feeb (car elt)))
+			(print-direction (feeb-image-facing (car elt)))))
+		 ((fireball-image-p (car elt))
+		  (list " *~a" (print-direction (fireball-image-direction (car elt)))))
+		 ((eq (car elt) :mushroom)
+		  (list " mm"))
+		 ((eq (car elt) :carcass)
+		  (list " cc"))
+		 (t (list "   "))))))
+    (format t "~%")))
+
+(defun simple-play (&optional layout)
+  (if layout
+      (change-layout layout))
+  (make-auto-feebs (- 10 (length *feebs-to-be*)))
+  (initialize-feebs)
+  (loop repeat *game-length* do
+	(play-one-turn) (print-map) (sleep 0.3) (format t "~%~%"))
+  (format t "Fim de jogo!!~%~%Pontuações:~%~%")
+  (dolist (feeb *feebs*)
+	 (format t "~a: ~d~%" (name (feeb-status feeb)) (score (feeb-status feeb)))))
+
+
+#|
+
+;;; Feeb creation.
+
+;; This a little better version of conservative-brain
+;; all others (stupid or redundant) brains of original
+;; feebs.lisp were eliminated
+ (defun simple-brain (status proximity vision vision-left vision-right)
+  (declare (ignore vision-left vision-right))
+  (let ((stuff (my-square proximity)))
+    (cond ((and (consp stuff) (member :mushroom stuff :test #'eq))
+	   :eat-mushroom)
+	  ((and (consp stuff) (member :carcass stuff :test #'eq))
+	   :eat-carcass)
+	  ((and (ready-to-fire status)
+		(> (energy-reserve status) 30)
+		(dotimes (index (min (line-of-sight status) 5))
+		  (if (find-if #'feeb-image-p (aref vision index))
+		      (return t))))
+	   :flame)
+	  ((and (not (eq (left-square proximity) :rock))
+		(> 2 (random 10)))
+	   :turn-left)
+	  ((and (not (eq (right-square proximity) :rock))
+		(> 2 (random 10)))
+	   :turn-right)
+	  ((plusp (line-of-sight status))
+	   :move-forward)
+	  ((not (wallp (left-square proximity)))
+	   :turn-left)
+	  ((not (wallp (right-square proximity)))
+	   :turn-right)
+	  ((not (wallp (rear-square proximity)))
+	   :turn-around))))
+
+|#

Added: license
==============================================================================
--- (empty file)
+++ license	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Added: main.lisp
==============================================================================
--- (empty file)
+++ main.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,412 @@
+;;; -*- Common Lisp -*-
+
+#|  Copyright (c) 2007 Gustavo Henrique Milaré
+
+    This file is part of The Feebs War.
+
+    The Feebs War is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    The Feebs War is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+|#
+
+
+(in-package :feebs)
+
+;;; Some functions
+
+(defmacro def-feeb-parm (name value doc)
+  `(progn
+    (defvar ,name ,value ,doc)
+    (pushnew ',name *feeb-parameters*)))
+
+(defun list-parameter-settings ()
+  (let ((settings nil))
+    (dolist (parm *feeb-parameters*)
+      (push (cons parm (symbol-value parm)) settings))
+    settings))
+
+(defun chance (ratio)
+  (< (random (denominator ratio)) (numerator ratio)))
+
+;;; General game parameters:
+
+(def-feeb-parm *game-length* 320
+  "Number of cycles in the simulation.")
+
+(def-feeb-parm *number-of-auto-feebs* 0
+  "Number of dumb system-provided feebs.")
+
+(def-feeb-parm *slow-feeb-noop-switch* nil
+  "If non-null, each feeb has a chance of having its orders aborted in
+   proportion to the time it takes to produce them.
+   See *slow-feeb-noop-factor*.")
+
+(def-feeb-parm *slow-feeb-noop-factor* 1/4
+  "If *slow-feeb-noop-switch* is non-null, a feeb's orders will be aborted
+   with probability equal to the product of this factor times the time
+   taken by this feeb divided by *reference-time*, if non-nil, or
+   the total time taken by all feebs this turn otherwise.")
+
+(def-feeb-parm *reference-time* nil
+  "Time taken by reference if non-nil. See *slow-feeb-noop-factor*.")
+
+(def-feeb-parm *sense-location-p* t
+  "If non-null, x-position and y-position will return nil when
+   some a behavior function tries to invoke it.")
+
+;;(def-feeb-parm *sense-facing-p* t
+;;  "If non-null, facing will return nil when one tries to
+;;   invoke it.")
+
+;;; Scoring:
+
+(def-feeb-parm *points-for-killing* 5
+  "Added to one's score for killing an opponent.")
+
+(def-feeb-parm *points-for-dying* -3
+  "Added to one's score for being killed or starving.")
+
+(def-feeb-parm *points-for-slow-down* -1
+  "Points earned when a feeb's move is aborted due to slowness.")
+
+;;; Cheating
+
+(def-feeb-parm *exclude-cheater-p* nil
+  "Tells if a feeb is excluded from the game when a cheating is done.")
+
+(def-feeb-parm *warn-when-cheating-p* t
+  "Tells if a continuable error must be signaled when a cheating is done.")
+
+;;; Characteristics of the maze:
+
+(def-feeb-parm *may-get-maze-map-p* t
+  "Tells if the function (get-maze-map) returns the map layout of nil
+   during the game.")
+
+(def-feeb-parm *maze-x-size* 32
+  "Number of columns in the maze.")
+
+(def-feeb-parm *maze-y-size* 32
+  "Number of rows in the maze.")
+
+(def-feeb-parm *number-of-mushrooms* 8
+  "Average number of mushrooms in the maze at any given time.")
+
+
+;;; Energies:
+
+(def-feeb-parm *flame-energy* 10
+  "Energy used when a feeb flames.")
+
+(def-feeb-parm *mushroom-energy* 50
+  "Energy gained when a mushroom is eaten.")
+
+(def-feeb-parm *carcass-energy* 30
+  "Energy gained by feeding on a carcass.")
+
+(def-feeb-parm *maximum-energy* 100
+  "The most energy a feeb can accumulate.")
+
+(def-feeb-parm *starting-energy* 50
+  "Smallest amount of energy a feeb will start with.")
+
+;;; Carcasses:
+
+(def-feeb-parm *carcass-guaranteed-lifetime* 5
+  "Minimum number of turns a carcass will hang around.")
+
+(def-feeb-parm *carcass-rot-probability* 1/3
+  "Chance of a carcass rotting away each turn after its guaranteed lifetime.")
+
+
+;;; Fireballs:
+
+(def-feeb-parm *fireball-dissipation-probability* 1/5
+  "Chance that a fireball will dissipate each turn after it is fired.")
+
+(def-feeb-parm *fireball-reflection-probability* 2/3
+  "Chance that a fireball will reflect when it hits a wall.")
+
+(def-feeb-parm *flame-recovery-probability* 1/3
+  "Chance a feeb will regain its ability to flame each turn after flaming once.")
+
+
+;;; Structures:
+
+;;; The Feeb structure contains all of the info relevant to a particular feeb.
+;;; The info available to the brain function is in the Status sub-structure.
+
+(defstruct (feeb
+	     (:print-function print-feeb)
+	     (:constructor make-feeb (id brain)))
+  id
+  brain
+  image
+  status
+  proximity
+  time
+  last-score
+  last-kills
+  facing
+  x-position
+  y-position
+  (dead-p nil)
+  (turns-since-flamed 0)
+  (vision (make-array (max *maze-x-size* *maze-y-size*)))
+  (vision-left (make-array (max *maze-x-size* *maze-y-size*)))
+  (vision-right (make-array (max *maze-x-size* *maze-y-size*))))
+
+(defstruct (status
+	    (:conc-name nil)
+	    (:constructor make-status (name graphics)))
+  (name "" :read-only t)
+  facing
+  graphics
+  x-position
+  y-position
+  peeking
+  line-of-sight
+  (energy-reserve *starting-energy*)
+  (score 0)
+  (kills 0)
+  (ready-to-fire t)
+  (aborted nil)
+  (last-move :dead))
+
+(defun print-feeb (structure stream depth)
+  (declare (ignore depth))
+  (format stream "#<Feeb ~S>"
+	  (name (feeb-status structure))))
+
+
+(defstruct (proximity
+	    (:conc-name nil))
+  my-square
+  rear-square
+  left-square
+  right-square)
+
+
+;;; These image structures are used to represent feebs and fireballs in
+;;; the sensory displays of other feebs.
+
+(defstruct (feeb-image
+	    (:print-function print-feeb-image)
+	    (:constructor make-feeb-image (name feeb)))
+  (name "" :read-only t)
+  facing
+  (feeb nil :read-only t)
+  peeking)
+
+(defun print-feeb-image (structure stream depth)
+  (declare (ignore depth))
+  (format stream "#<Feeb-Image of ~S facing ~S>"
+	  (feeb-image-name structure)
+	  (feeb-image-facing structure)))
+
+(defstruct (fireball-image
+	    (:print-function print-fireball-image)
+	    (:constructor make-fireball-image (direction owner x y dx dy)))
+  direction
+  owner
+  x
+  y
+  dx
+  dy
+  (new t))
+
+(defun print-fireball-image (structure stream depth)
+  (declare (ignore depth))
+  (format stream "#<Fireball moving ~S>"
+	  (fireball-image-direction structure)))
+
+(defstruct (pos (:constructor make-pos (x y)))
+  x
+  y)
+
+;;; Changing the maze
+(defun change-layout (layout)
+  (when *feebs-to-be*
+    (warn "There are some feebs that have already been defined.
+They could have used (get-maze-map). Those are they:
+~a." (loop for feeb in *feebs-to-be* collect (first feeb))))
+  (let ((x (length layout))
+	(y (length (car layout))))
+    (loop for string in layout do
+	  (if (/= (length string) y)
+	      (error "Not all the strings in ~a have the same size." layout)))
+    (setf *layout* layout
+	  *maze-y-size* y
+	  *maze-x-size* x)))
+
+(defun get-maze-map ()
+  (when *may-get-maze-map-p*
+    (unless (and *maze* *fake-maze*)
+      (init-maze))
+    (let ((new-maze (make-array (list *maze-x-size* *maze-y-size*))))
+      (dotimes (x *maze-x-size*)
+	(dotimes (y *maze-y-size*)
+	  (setf (aref new-maze x y) (aref *fake-maze* x y))))
+      new-maze)))
+
+(defun init-maze ()
+  (setf *maze* (make-array (list *maze-x-size* *maze-y-size*))
+	*fake-maze* (make-array (list *maze-x-size* *maze-y-size*))
+	*entry-points* nil)
+  (do ((rows *layout* (cdr rows))
+       (i (1- *maze-y-size*) (1- i)))
+      ((null rows))
+    (let ((str (car rows)))
+      (dotimes (j (length str))
+	(setf (aref *maze* j i) nil
+	      (aref *fake-maze* j i) nil)
+	(case (schar str j)
+	  (#\X
+	   (setf (aref *maze* j i) :rock
+		 (aref *fake-maze* j i) :rock))
+	  (#\*
+	   (setf (aref *fake-maze* j i) :mushroom-place)
+	   (push (make-pos j i) *mushroom-sites*))
+	  (#\e
+	   (setf (aref *fake-maze* j i) :feeb-entry-place)
+	   (push (make-pos j i) *entry-points*))
+	  (#\space nil)
+	  (t
+	   (error "Unknown spec in maze: ~C." (schar str j))))))))
+
+(defun initialize-feebs ()
+  (setf *mushrooms-alive* *number-of-mushrooms*
+	*dead-feebs* nil
+	*fireballs-flying* nil
+	*continue* t
+	*mushroom-sites* nil
+	*entry-points* nil
+	*carcasses* nil
+	*static-parameters*
+	 (loop for (symbol . value) in (list-parameter-settings)
+	       collect value))
+  (init-maze)
+  (setf *number-of-mushroom-sites* (length *mushroom-sites*)
+	*number-of-entry-points*   (length *entry-points*))
+  (create-feebs)) ; The feebs are defined here
+
+(defun create-mushrooms ()
+  (dotimes (i (- *number-of-mushrooms* (length *mushrooms-alive*) (random 3)))
+    (do ((site (nth (random *number-of-mushroom-sites*) *mushroom-sites*)
+	       (nth (random *number-of-mushroom-sites*) *mushroom-sites*)))
+	((null (aref *maze* (pos-x site) (pos-y site)))
+	 (setf (aref *maze* (pos-x site) (pos-y site)) :mushroom)))))
+
+;;; Setting up the feebs.
+
+(defvar *feebs* nil
+  "A list of all the feebs in the current game.")
+
+(defvar *next-feeb-id* 0
+  "A counter used to assign a unique numerical code to each feeb.")
+
+;;; Define-Feeb builds a list of feebs to create.  Create-Feebs actually
+;;; builds the feebs on this list.
+
+(defvar *feebs-to-be* nil)
+
+(defun define-feeb (name brain &optional prepare graphs)
+  (if (delete-feeb name)
+      (warn "Feeb ~s already exists, deleting..." name))
+  (push (list name brain prepare graphs) *feebs-to-be*))
+
+(defun delete-feeb (name)
+  (not
+   (equal *feebs-to-be*
+	  (setf *feebs-to-be*
+		(remove name *feebs-to-be* :key #'car :test #'string=)))))
+
+(defun create-feebs ()
+  (flet ((create-feeb (name brain prepare graphs)
+	   (let ((pos (pick-random-entry-point))
+		 (feeb (make-feeb *next-feeb-id* brain)))
+	     (incf *next-feeb-id*)
+	     (setf (feeb-image feeb)
+		    (make-feeb-image name feeb)
+		   (feeb-status feeb)
+		    (make-status name nil); (sdl:load-and-convert-image graphs))
+		   (feeb-proximity feeb)
+		    (make-proximity))
+	     (change-feeb-pos feeb (pos-x pos) (pos-y pos))
+	     (change-feeb-facing feeb (random 4))
+	     (push feeb *feebs*)
+	     (place-object (feeb-image feeb) (pos-x pos) (pos-y pos))
+	     (when prepare
+	       (let (*static-parameters* *fake-maze*)
+		 (funcall prepare))
+	       (check-cheating name)))))
+    (setf *feebs* nil
+	  *next-feeb-id* 0)
+    (dolist (feeb-spec (reverse *feebs-to-be*))
+      (apply #'create-feeb feeb-spec))))
+
+;;; Start at some randomly chosen entry point.  If this one is occupied,
+;;; scan successive entry points until a winner is found.  Circle back
+;;; to start of list if necessary.
+
+(defun pick-random-entry-point ()
+  (do ((points (nth (random *number-of-entry-points*) *entry-points*)
+	       (nth (random *number-of-entry-points*) *entry-points*)))
+      (nil)
+    (when (null (aref *maze* (pos-x points)
+		      (pos-y points)))
+      (return points))))
+
+;;; Movement interface.
+
+(defun delete-object (thing x y)
+  (when (eq thing :mushroom)
+    (decf *mushrooms-alive*))
+  (setf (aref *maze* x y)
+	(delete thing (aref *maze* x y))))
+
+(defun place-object (thing x j)
+  (when (eq thing :mushroom)
+    (incf *mushrooms-alive*))
+  (push thing (aref *maze* x j)))
+
+;;; Functions to change optional structure in status
+
+(defun change-feeb-pos (feeb x y)
+  (setf (feeb-x-position feeb) x
+	(feeb-y-position feeb) y)
+  (if *sense-location-p*
+      (setf (x-position (feeb-status feeb)) x
+	    (y-position (feeb-status feeb)) y)))
+
+(defun change-feeb-facing (feeb facing)
+  (setf (feeb-facing feeb)
+;;      ;; use this code to make *sense-facing-p* available
+;;      ;; but be carefull - it does not really work
+;;	(if (or *sense-location-p* *sense-facing-p*)
+;;	    (setf (facing (feeb-status feeb))
+;;		  facing)
+;;	    facing)
+	(setf (facing (feeb-status feeb))
+	      (setf (feeb-image-facing (feeb-image feeb))
+		    facing))))
+
+(defun kill-feeb (feeb)
+  (setf *dead-feebs* (nconc *dead-feebs* (list feeb))
+	(feeb-dead-p feeb) t)
+  (let* ((status (feeb-status feeb))
+	 (x (feeb-x-position feeb))
+	 (y (feeb-y-position feeb)))
+    (push (list 0 x y) *carcasses*)
+    (incf (score status) *points-for-dying*)
+    (delete-object (feeb-image feeb) x y)
+    (place-object :carcass x y)))

Added: mazes.lisp
==============================================================================
--- (empty file)
+++ mazes.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,238 @@
+;;; -*- Common Lisp -*-
+
+;;; Mazes for Planet of the Feebs.
+;;; A somewhat educational simulation game.
+;;;
+;;; Created by Jim Healy, July 1987.
+;;;
+;;; **************************************************
+;;; Maze guidelines:
+;;;    Maze should be *maze-i-size* by *maze-j-size*
+;;;       (currently 32 x 32).
+;;;    X represents a wall.
+;;;    * represents a mushroom patch.
+;;;    e is a feeb entry point.
+;;; **************************************************
+
+;;; Maze1 has a good number of dead ends and little nooks.
+
+(in-package :feebs)
+
+(defparameter *maze-1*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "XXX     *eXXXX      *e      ** X"
+    "XXX XXXXX XXXX XXXXXXXXXXXX XX X"
+    "XXX   XXX      XXXXXX       X  X"
+    "XXXXX XXXXXXX XXXXXXX XXXXXXX XX"
+    "X *       XXX XX *    XeXX    XX"
+    "X XXXXXXX XXX XXXXXXX X XXX XXXX"
+    "X  XXXXXX XXX XX      X      *XX"
+    "X XXXXXXX XXX XXXXXXX XXXXXXXXXX"
+    "X XXXXXXX XXX*     e  XXXXXX XXX"
+    "X         XXXXX XXXXXXXXX  * XXX"
+    "X XXXXX XXXXXX     XXXXXX XX  XX"
+    "X eXXXX XXXXXX XXX  XXXXX XX XXX"
+    "X XXXXX*       XXXXe XXXX XX  XX"
+    "X XXXXX XXXXXX XXXXX  XXX XXX XX"
+    "X eXXXX    e   XXXXXX *XX XX  XX"
+    "X XXXXX XXXXXX XXXXXXX  X XXeXXX"
+    "X   XXX        XXXXXXXX   XX  XX"
+    "X XXXXX XXXXXX XXXXXXXXXX XXXXXX"
+    "X XXXXX      * XXXXX          XX"
+    "X*  XXX XXXXXX XXXXX XXXXXX X XX"
+    "X XXXXX e      XXXXX X  e   X XX"
+    "X XX XX XXXXXX XXXXX X XXXXXX XX"
+    "X         *XXX XXXXX       *  XX"
+    "X XX XX XXXXXX XXXXXXXXXX XXXXXX"
+    "X XXXXX XXXXXX   *   *        XX"
+    "X   XXX XXXXXXXXXXXXXXXXXXXXX XX"
+    "X XXXX    X    X   eX    X    XX"
+    "X  XXX XX X XX X XX X XX X XX XX"
+    "X XXXX XX X XX X XX X XX*X XX XX"
+    "X e *  XX   XX * XX   XX   XXeXX"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+;;; Maze2 doesn't have any really long corridors.
+
+(defparameter *maze-2*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "X  eXXXXX * X   XXXXXX X e XXXXX"
+    "X XXXX    X X XXXX   X   X XXXXX"
+    "X  XX  XXXX   XXXX X*  X X XXXXX"
+    "XX XX XXX   XXXX   XX XX X     X"
+    "XX e  XXX XXXXXXX XX  XXXXXXXX*X"
+    "XXXX XXX    XXXXX X e XXX   XX X"
+    "XXXX XXX XXXXXXXX   XXXX  X    X"
+    "XX * XX   XXe  XXXXXXXXXX XX XXX"
+    "XX XXXX X XX X   XXX XXXXX   XXX"
+    "XX        XX XXX X   XX    XXXXX"
+    "XXXXX XXX   *XXX   X    XXXXXXXX"
+    "XX*   XXXXXX  XXXX XXXX XXXXXXXX"
+    "XXXXX XX XXXX XXXXXXXXX XXXXXXXX"
+    "XXXXX  e XXXX   *XXXXXX   eXXXXX"
+    "XXXXXXXX XXXXXXX XXXXXXXXX XXXXX"
+    "XXXXXX     XXXXX  eXXXXX   XXXXX"
+    "XXXXXX XXX XXXXXXX XXXXX XXXXXXX"
+    "XX     XXX X   XXX XX    X    XX"
+    "XX XXX   XXXXX XX   XX XXX XX XX"
+    "XX XXXXX  *X   XX X XX XXXXXX*XX"
+    "X    XXXXX   XXXX X      XX   XX"
+    "X XX XXXXXXX   XXXXX*X X Xe XXXX"
+    "X    XXXX  e X XXXXX*XX  XX XXXX"
+    "X XX XXXXXX XX   XXX*XXX     XXX"
+    "XXXX  eXXX  XXXX XX  XXXXX X   X"
+    "XXXXXX XXXXXXXXX XX XXXX   XXX X"
+    "XXX *  X X    XX    XXXX XXX X X"
+    "XX  XXXX X XX XXXX XXX   X  e  X"
+    "XX XX  *   X *   X XXXX XX XXX*X"
+    "XX    XXX XXX XX  eXXX     XXX*X"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+;;; Maze3 has the minimum number of mushroom sites, most
+;;; of which are between a rock and a hard place.  Those
+;;; poor feebs!
+
+(defparameter *maze-3*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "X    e  XXXXXX XXXXXXX*XXXXXXXXX"
+    "X X XXX XXXXX e   XXXX XXX e   X"
+    "X   XXX XXXXXX XX XX   XXX XXX X"
+    "XXX XXX XXXXXX XX XX X X   e   X"
+    "Xe  XXX*XXXX*  XX XXeX X XXXXX X"
+    "X X XXX XXXXXX XX XX X   XXXXX X"
+    "X   XXX XXXXXX XX*   XXXXXXXXX X"
+    "X XXXXX XX e   XX XXXXXXXX XXX X"
+    "X X XXX XXX XXXXX XXXXXX   XXX X"
+    "Xe  XXX      XXXX XXXX   X X   X"
+    "XXX XXXX XXXXXXXX  X   XXX   XXX"
+    "XXX  eXX XXXXXXXXX   XXXXX XXXXX"
+    "XXXXX XXXXXXXXXXXX XXXXXX    XXX"
+    "XXXXX     *    XX eXX XXX XX XXX"
+    "XX*XXXX XXXXXX XX XXX XXX XX XXX"
+    "XX X    XXXXX  X  XXX    eXX XXX"
+    "X    XXXXXXXX XX XXXX XXX XX XXX"
+    "X XXXXeXXXXXX    XXXX XXX XX XXX"
+    "X      XX*XXXXX XXXXXXXXX    XXX"
+    "XXXXXX    XXX   XXXX  XXXXXX XXX"
+    "XXXXXXXXX XXX XXXXXX XXXXXX  XXX"
+    "XXX       XX  e          eX XXXX"
+    "XX  XXXXX    XXXX XXXX XXXX XXXX"
+    "XX XXXXX  XX XXXX XXXX XXXX   XX"
+    "XX eXXXX XX  XXXX XXXX XXXXXX XX"
+    "XXX XX   XXX     *        XXX XX"
+    "XX  XX XXXX* XXXX XXXX XXXXXX XX"
+    "XXX  X XXXXX XXXX XXXX X      XX"
+    "XXXX    e    XXXX XXXX X XX X  X"
+    "XXXXXXXXXXXX     *e       X e XX"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+
+;;; Maze4 is symmetric about the vertical axis.  (Wow...)
+
+(defparameter *maze-4*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "X*        eXXXXXXXXXXe        *X"
+    "X XXXXXXXX            XXXXXXXX X"
+    "X XX   XXXXXXX XX XXXXXXX   XX X"
+    "X    XeXXXXXXX XX XXXXXXXeX    X"
+    "XX X XXXXXXX  eXXe  XXXXXXX X XX"
+    "XX X XXXXXXX XXXXXX XXXXXXX X XX"
+    "XX * XXXXXXX XXXXXX XXXXXXX * XX"
+    "XX X XXXe              eXXX X XX"
+    "XX X XXX XXXXXXXXXXXXXX XXX X XX"
+    "XX e XXX    XXXXXXXX    XXX e XX"
+    "XX X XXXXXX XXXXXXXX XXXXXX X XX"
+    "XX X XXXX   XXXXXXXX   XXXX X XX"
+    "XX   XXXX XXXe   eXXXX XXXX   XX"
+    "XXX XXXXX XXX XXX XXXX XXXXX XXX"
+    "XXX XXXXX XXX      XXX XXXXX XXX"
+    "X*  XXXXX     XXXX     XXXXX  *X"
+    "X XXXXX XX XX  **  XX XX XXXXX X"
+    "X XXXXX XX XX XXXX XX XX XXXXX X"
+    "X XXX e XX XX XXXX XX XX e XXX X"
+    "X XXXXX XX    XXXX    XX XXXXX X"
+    "X XXXXX XXXXX XXXX XXXXX XXXXX X"
+    "X     X XXXXX XXXX XXXXX X     X"
+    "XXXXX  *                *  XXXXX"
+    "XXXXX XXXXXXXX XX XXXXXXXX XXXXX"
+    "XXXXX XXXXXXXX XX XXXXXXXX XXXXX"
+    "XXXXX    XXXXX XX XXXXX    XXXXX"
+    "XXXX  XX  XXXXeXXeXXXX  XX  XXXX"
+    "XXX  XXXX  XXX XX XXX  XXXX  XXX"
+    "XXX XXXXXX XXX XX XXX XXXXXX XXX"
+    "XX*       e    XX    e       *XX"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+;;; Maze5 has a lot of long corridors good for feeb showdowns.
+;;; Furthermore, all the feeb entry-points are in the corridors.
+;;; You can run but you can't hide!
+
+(defparameter *maze-5*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "X              e           e   X"
+    "X XXXXXXX*XXXXXXXXXXXX XXXXXXX X"
+    "X               e              X"
+    "X X XXXXX XXXXXXXXXXXX XXXXX X X"
+    "X              *               X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XXeXX X X"
+    "X X XX XX    *         XX XX X X"
+    "XeX XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX          e   XX XXeX X"
+    "X X XXeXX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX XeX"
+    "X*X XX XX              XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X XeXX XX XXXXXXXXXXXX*XX XX X X"
+    "X X XX XX  *           XX XX*X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX  e           XX XX*X X"
+    "X X XX*XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX              XX XXeX X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X X XX XX XXXXXXXXXXXX XX XX X X"
+    "X             e                X"
+    "X*X XXXXX XXXXXXXXXXXX XXXXX X*X"
+    "X             e       *        X"
+    "X XXXXXXX XXXXXXXXXXXX XXXXXXX X"
+    "X     e        *               X"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+;;; Use this template to create new mazes.
+
+#| (defparameter *maze-template*
+    '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+      "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")) |#

Added: package.lisp
==============================================================================
--- (empty file)
+++ package.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,211 @@
+;;; -*- Common Lisp -*-
+
+#|  Copyright (c) 2007 Gustavo Henrique Milaré
+
+    This file is part of The Feebs War.
+
+    The Feebs War is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    The Feebs War is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+|#
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;                                    ;;;
+;;;          The Feebs War             ;;;
+;;;                                    ;;;
+;;; Written by Gustavo Henrique Milaré ;;;
+;;;                                    ;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; The GPL should in the file "license", provided with the software.
+
+;;; based on Planet of the Feebs
+
+;;; About Planet of the Feebs:
+;;
+;; Written by Skef Wholey.
+;; Modified by Scott Fahlman.
+;; Modified by Dan Kuokka.
+;; Modified by Jim Healy.
+;;
+;; Graphics ported to X11 by Fred Gilham 8-FEB-1998.
+;;
+;;
+;;; This project exists thanks to them
+
+
+(defpackage :feebs
+  (:use :common-lisp)
+  ;; Export everything we want the players to get their hands on.
+  (:export *number-of-feebs* *game-length*
+	   *number-of-auto-feebs*
+
+	   ;; 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
+	   *carcass-guaranteed-lifetime*
+	   *carcass-rot-probability*
+	   *fireball-dissipation-probability*
+	   *fireball-reflection-probability*
+	   *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
+	   name facing
+	   x-position y-position peeking line-of-sight
+	   energy-reserve
+	   score kills
+	   ready-to-fire
+	   aborted last-move
+	   
+	   my-square left-square right-square rear-square
+	   
+	   ;; Images
+	   feeb-image-p feeb-image-name
+	   feeb-image-facing feeb-image-peeking
+	   fireball-image-p fireball-image-direction
+	   
+	   ;; Functions
+	   list-parameter-settings
+	   define-feeb delete-feeb
+	   feebs
+	   change-layout
+	   get-maze-map
+
+	   ;; Constants
+	   north south east west
+
+	   ;; Some layouts (can be find in mazes.lisp)
+	   *maze-1* *maze-2* *maze-3* *maze-4* *maze-5*
+	   *maze-template*
+
+	   ;; Graphics
+	   create-graphics
+
+	   ;; Extras
+
+	   ;; Directional arithmetic
+	   left-of right-of behind-of
+	   relative-facing
+	   
+	   forward-dx forward-dy
+	   left-dx left-dy
+	   right-dx right-dy
+	   behind-dx behind-dy
+
+	   ;; Others
+	   wallp
+
+	   ;; Graphics for alpha release
+	   simple-play print-map))
+
+(in-package :feebs)
+
+;;; Directions
+
+(defconstant north 0)
+(defconstant east  1)
+(defconstant south 2)
+(defconstant west  3)
+
+
+;;; Parameters that affect strategy of the game.
+
+(defvar *number-of-mushroom-sites* 0)
+(defvar *feeb-parameters* nil)
+
+;;; These are for security
+
+(defvar *static-parameters* nil)
+
+;;; Setting up the maze.
+
+;;; The default maze.
+;;; X represents a wall,
+;;; * represents a mushroom patch, and
+;;; e is a feeb entry point.
+
+(defvar *maze* nil)
+(defvar *fake-maze* nil)
+
+(defparameter *layout*
+  '("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+    "Xe   *        XXXXXXX XXXXXXXXXX"
+    "XXXXX XXXXXXX XXXXXXX    * XXXXX"
+    "XXXXX XXXXXXX XXXXXXX XXX XXXXXX"
+    "XXXXX XXX XXX  XXXXXXeXXX XXXXXX"
+    "XXXXX XXX XXXX XXXXXXXXXX XXXXXX"
+    "XXXXX XXX XXXX XX XXXXXXX XXXXXX"
+    "XXXXX    *  XX XX XXXXXXX XXXXXX"
+    "XXXXX XXXX XXX XX*    *   XXXXXX"
+    "XX   *XXXX XXX XX XXXX XXXXXXXXX"
+    "XX XX XXXXeXXX XX XXXX XXXXXXXXX"
+    "XX XX XXXX XXX   * *  *        X"
+    "XX XX XXXX XXXXXXXX XXXXXXXXXXeX"
+    "XXeXX XXXX XXXXXXXX XXXXXXXXXX X"
+    "XX XX     *   *     XXXXXXXX   X"
+    "XX XXXXXXXXXXX XXXX XXXXXXXX XXX"
+    "XX eXXXXXXXXXX  XXXe  XXXXXX XXX"
+    "XX XXXXXXXXXXXXe XXXXXXXXXXX XXX"
+    "XX*  XXX XXXXXXX  XXXXXXXXXX XXX"
+    "XX X  XX XXXXXXXX eXXXXXXXXX XXX"
+    "XX XX  X XXXXXXXXX  XXXXXXXX XXX"
+    "X  XXX  *    XXXXXX*        *  X"
+    "X XXXXXX XXX XXXXXX XXXXXXXXXX X"
+    "X XXXXXX XXX XXXXXX X        X X"
+    "X XXXXXX XXX XXXXXX X XXXXXX X X"
+    "X    *     *     XX X X  *eX X X"
+    "XXXXX XXXX XXXXXXXX X XXX XX X X"
+    "XXXXX XXXX XXXXX   *X XXX XX X X"
+    "XXXXX XXXX XXXXX XX X    e   X X"
+    "XXXXX XXXX     e XX XXX*XXXXXX X"
+    "XXXXX XXXXXXXXXXXXX            X"
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+(defparameter *maze-x-size* 32)
+(defparameter *maze-y-size* 32)
+
+
+;;; Quantities during the game
+
+(defvar *mushroom-sites*)
+(defvar *entry-points*)
+(defvar *number-of-entry-points*)
+(defvar *mushrooms-alive*)
+
+;;; Elements in the maze
+
+(defvar *fireballs-flying*)
+(defvar *dead-feebs*)
+(defvar *carcasses*)
+
+(defvar *continue*)
+

Added: system.lisp
==============================================================================
--- (empty file)
+++ system.lisp	Wed Dec 19 15:36:51 2007
@@ -0,0 +1,304 @@
+;;; -*- Common Lisp -*-
+
+#|  Copyright (c) 2007 Gustavo Henrique Milaré
+
+    This file is part of The Feebs War.
+
+    The Feebs War is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    The Feebs War is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+|#
+
+
+(in-package :feebs)
+
+(defun reincarnate-feeb (feeb)
+  (let ((pos (nth (random (length *entry-points*)) *entry-points*))
+	(status (feeb-status feeb)))
+    (place-object (feeb-image feeb)
+		  (pos-x pos) (pos-y pos))
+    (change-feeb-pos feeb (pos-x pos) (pos-y pos))
+    (change-feeb-facing feeb (random 4))
+    (setf (feeb-dead-p feeb) nil
+	  (ready-to-fire status) t
+	  (energy-reserve status) *starting-energy*
+	  (last-move status) :dead)))
+
+
+;;; Vision calculation.
+
+;;; These guys tell us offsets given an orientation.
+
+(defun compute-vision (feeb)
+  (let ((status (feeb-status feeb))
+	(proximity (feeb-proximity feeb))
+	(vision (feeb-vision feeb))
+	(vision-left (feeb-vision-left feeb))
+	(vision-right (feeb-vision-right feeb))
+	(facing (feeb-facing feeb))
+	vision-dx
+	vision-dy
+	(x (feeb-x-position feeb))
+	(y (feeb-y-position feeb)))
+    ;; First fill in proximity info.
+    (setf (my-square proximity)
+	   (aref *maze* x y)
+	  (left-square proximity)
+	   (aref *maze* (+ x (left-dx facing)) (+ y (left-dy facing)))
+	  (right-square proximity)
+	   (aref *maze* (+ x (right-dx facing)) (+ y (right-dy facing)))
+	  (rear-square proximity)
+	   (aref *maze* (+ x (behind-dx facing)) (+ y (behind-dy facing))))
+    ;; The vision vector starts in the square the feeb is facing.
+    (setf x (+ x (forward-dx facing))
+	  y (+ y (forward-dy facing)))
+    ;; Figure out which direction to scan in.
+    (case (peeking status)
+      (:left (setf facing (left-of facing)))
+      (:right (setf facing (right-of facing))))
+    (setf vision-dx (forward-dx facing)
+	  vision-dy (forward-dy facing))
+    ;; compute vision, vision-left and vision-right
+    (do* ((x x (+ x vision-dx))
+	  (y y (+ y vision-dy))
+	  (left-wall-x (+ x (left-dx facing)) (+ left-wall-x vision-dx))
+	  (left-wall-y (+ y (left-dy facing)) (+ left-wall-y vision-dy))
+	  (right-wall-x (+ x (right-dx facing)) (+ right-wall-x vision-dx))
+	  (right-wall-y (+ y (right-dy facing)) (+ right-wall-y vision-dy))
+	  (index 0 (1+ index)))
+	 ((wallp (aref *maze* x y))
+	  (setf (aref vision index) (aref *maze* x y)
+		(aref vision-left index) :unknown
+		(aref vision-right index) :unknown
+		(line-of-sight status) index))
+      (setf (aref vision index) (aref *maze* x y)
+	    (aref vision-left index)
+	     (side-imagify (aref *maze* left-wall-x left-wall-y)
+			  (right-of facing))
+	    (aref vision-right index)
+	     (side-imagify (aref *maze* right-wall-x right-wall-y)
+			   (left-of facing))))))
+
+;;; Compute the info to be put into the vision-left and vision-right vectors.
+;;; A peeking feeb must be facing in the specified direction in order to count.
+
+(defun side-imagify (stuff facing)
+  (cond
+    ((wallp stuff)
+     stuff)
+    ((find-if #'(lambda (thing)
+		  (and (feeb-image-p thing)
+		       (peeking (feeb-status (feeb-image-feeb thing)))
+		       (= facing (feeb-image-facing thing))
+		       (setf facing thing)))
+	      stuff)
+     (peeking (feeb-status (feeb-image-feeb facing))))
+    (t nil)))
+
+;;; Movement.
+
+;;; Each turn, the following stuff has to happen:
+;;;	1. Bump the turn counter; end the game if we should.
+;;;	2. Maybe grow some mushrooms.
+;;;	3. Maybe disappear some carcasses.
+;;;	4. Move fireballs around.
+;;;	5. See if any feebs have starved.
+;;;	6. See if any feebs can flame again.
+;;;	7. Compute vision and stuff for feebs.
+;;;	8. Collect the feebs' moves.
+;;;	9. Do the feeb's moves.
+
+(defun play-one-turn ()
+  ;; Grow some mushrooms:
+  (dotimes (x (- *number-of-mushrooms* *mushrooms-alive*))
+    (let* ((site (nth (random *number-of-mushroom-sites*) *mushroom-sites*))
+	   (x (pos-x site))
+	   (y (pos-y site)))
+      (unless (member :mushroom (aref *maze* x y))
+	(place-object :mushroom x y))))
+  ;; Rot some carcasses:
+  (dolist (carc *carcasses*)
+    (when (and
+	   (> (incf (first carc) *carcass-guaranteed-lifetime*))
+	   (chance *carcass-rot-probability*))
+      (delete-object :carcass (second carc) (third carc))
+      (setf *carcasses* (delete carc *carcasses*))
+      (if *dead-feebs*
+	  (reincarnate-feeb (pop *dead-feebs*)))))
+  ;; Move some fireballs:
+  (dolist (fireball *fireballs-flying*)
+    (move-one-fireball fireball))
+  ;; Starve some feebs:
+  (dolist (feeb *feebs*)
+    (unless (feeb-dead-p feeb)
+      (when (<= (decf (energy-reserve (feeb-status feeb))) 0)
+	(kill-feeb feeb))))
+  ;; Let some feebs regain the power to flame:
+  (dolist (feeb *feebs*)
+    (unless (and (feeb-dead-p feeb)
+		 (ready-to-fire (feeb-status feeb)))
+      (when (and (> (incf (feeb-turns-since-flamed feeb))
+		    1)
+		 (chance *flame-recovery-probability*))
+	(setf (ready-to-fire (feeb-status feeb)) t))))
+  ;; Collect all the feebs' moves, keeping track of the time each one takes.
+  (let ((total-time 1))
+    (dolist (feeb *feebs*)
+      (unless (feeb-dead-p feeb)
+	(compute-vision feeb) ; Compute vision for all the feeb.
+	(let ((time (get-internal-real-time)))
+	  (let ( *static-parameters* *fake-maze*)
+	    (setf (last-move (feeb-status feeb))
+		  (funcall (feeb-brain feeb)
+			   (feeb-status feeb)
+			   (feeb-proximity feeb)
+			   (feeb-vision feeb)
+			   (feeb-vision-left feeb)
+			   (feeb-vision-right feeb))
+		  time (- (get-internal-real-time) time)))
+	  (incf total-time time)
+	  (setf (feeb-time feeb) time))))
+    ;; Do all the feebs' moves, or perhaps abort the move according
+    ;; to the time taken by the feeb.
+    (setf total-time (float total-time))
+    (dolist (feeb *feebs*)
+      (unless (feeb-dead-p feeb)
+	(if (and *slow-feeb-noop-switch*
+		 (< (random 1.0)
+		    (* *slow-feeb-noop-factor*
+		       (/ (float (feeb-time feeb))
+			  (or *reference-time* total-time)))))
+	    (progn
+	      (setf (aborted (feeb-status feeb)) t)
+	      (incf (score (feeb-status feeb)) *points-for-slow-down*))
+	    (progn
+	      (setf (aborted (feeb-status feeb)) nil)
+	      (do-move feeb (last-move (feeb-status feeb)))))
+	;; Make the image consistent with the feeb.
+	(setf (feeb-image-facing (feeb-image feeb))
+	       (feeb-facing feeb))))))
+
+(defun move-one-fireball (fireball)
+  (let ((x (fireball-image-x fireball))
+	(y (fireball-image-y fireball)))
+    ;; Remove fireball from current square, unless it is new.
+    (if (fireball-image-new fireball)
+	(setf (fireball-image-new fireball) nil)
+	(delete-object fireball x y))
+    ;; The fireball might dissipate.
+    (when (chance *fireball-dissipation-probability*)
+	  (setq *fireballs-flying* (delete fireball *fireballs-flying*))
+	  (return-from move-one-fireball nil))
+    ;; Now move it to new coordinates.
+    (incf x (fireball-image-dx fireball))
+    (incf y (fireball-image-dy fireball))
+    ;; If it hits rock, either reflect or dissipate.
+    (when (wallp (aref *maze* x y))
+      (cond ((chance *fireball-reflection-probability*)
+	     (setf (fireball-image-dx fireball)
+		   (- (fireball-image-dx fireball)))
+	     (setf (fireball-image-dy fireball)
+		   (- (fireball-image-dy fireball)))
+	     (setf (fireball-image-direction fireball)
+		   (behind (fireball-image-direction fireball)))
+	     (setq x (fireball-image-x fireball))
+	     (setq y (fireball-image-y fireball)))
+	    (t (setq *fireballs-flying*
+		     (delete fireball *fireballs-flying*))
+	       (return-from move-one-fireball nil))))
+    ;; Now put the fireball into the new square.
+    (setf (fireball-image-x fireball) x)
+    (setf (fireball-image-y fireball) y)
+    (place-object fireball x y)
+    ;; And destroy whatever is there.
+    (delete-object :mushroom x y)
+    (dolist (thing (aref *maze* x y))
+      (if (feeb-image-p thing)
+	  (score-kill fireball (feeb-image-feeb thing))))))
+
+;;; The fireball kills the feeb.  Update score for killer and victims.
+;;; No credit for the kill if you shoot yourself.
+
+(defun score-kill (fireball feeb)
+  (unless (eq (fireball-image-owner fireball) feeb)
+    (incf (score (feeb-status (fireball-image-owner fireball)))
+	  *points-for-killing*)
+    (incf (kills (feeb-status (fireball-image-owner fireball)))))
+  (kill-feeb feeb))
+
+;;; Doing feeb moves.
+
+(defun do-move (feeb move)
+  (let ((status (feeb-status feeb))
+	(facing (feeb-facing feeb)))
+    ;; Peeking gets undone every move.
+    (setf (peeking status)
+	  (setf (feeb-image-peeking (feeb-image feeb)) nil))
+    (case move
+      (:turn-left
+       (change-feeb-facing feeb (left-of facing)))
+      (:turn-right
+       (change-feeb-facing feeb (right-of facing)))
+      (:turn-around
+       (change-feeb-facing feeb (behind facing)))
+      (:move-forward
+       (let* ((old-x (feeb-x-position feeb))
+	      (old-y (feeb-y-position feeb))
+	      (new-x (+ (forward-dx facing) old-x))
+	      (new-y (+ (forward-dy facing) old-y))
+	      (stuff (aref *maze* new-x new-y)))
+	 (when (wallp stuff)
+	   (return-from do-move nil))
+	 (delete-object (feeb-image feeb) old-x old-y)
+	 (change-feeb-pos feeb new-x new-y)
+	 (place-object (feeb-image feeb) new-x new-y)
+	 ;; Look for a fireball in the destination square.
+	 (let ((thing (find-if #'fireball-image-p stuff)))
+	   (when thing
+	     (score-kill thing feeb)
+	     (return-from do-move nil)))))
+      (:flame
+       (when (ready-to-fire status)
+	 (let* ((x (feeb-x-position feeb))
+		(y (feeb-y-position feeb))
+		(fireball (make-fireball-image
+			   facing feeb x y
+			   (forward-dx facing) (forward-dy facing))))
+	   ;; Queue the fireball, marked as new, but don't put it on map yet.
+	   (push fireball *fireballs-flying*)
+	   (decf (energy-reserve status) *flame-energy*)
+	   (setf (ready-to-fire status) nil)
+	   (setf (feeb-turns-since-flamed feeb) 0))))
+      (:eat-mushroom
+       (let* ((x (feeb-x-position feeb))
+	      (y (feeb-y-position feeb)))
+	 (when (member :mushroom (aref *maze* x y))
+	   (delete-object :mushroom x y)
+	   (setf (energy-reserve status)
+		 (min (+ (energy-reserve status) *mushroom-energy*)
+		      *maximum-energy*)))))
+      (:eat-carcass
+       (let* ((x (feeb-x-position feeb))
+	      (y (feeb-y-position feeb)))
+	 (when (member :carcass (aref *maze* x y))
+	   (setf (energy-reserve status)
+		 (min (+ (energy-reserve status) *carcass-energy*)
+		      *maximum-energy*)))))
+      ((:peek-left :peek-right)
+       (unless (wallp (aref *maze* (+ (feeb-x-position feeb)
+				      (forward-dx facing))
+			         (+ (feeb-y-position feeb)
+				    (forward-dy facing))))
+	 (setf (peeking status)
+	       (setf (feeb-image-peeking (feeb-image feeb)) move))))
+      (:wait nil)
+      (t (warn "Unknown feeb movement: ~a." move)))))



More information about the The-feebs-war-cvs mailing list