initial framework added
[fp1415-soccerfun.git] / src / Game / FootballerFunctions.dcl
diff --git a/src/Game/FootballerFunctions.dcl b/src/Game/FootballerFunctions.dcl
new file mode 100644 (file)
index 0000000..4f1e8f9
--- /dev/null
@@ -0,0 +1,32 @@
+definition module FootballerFunctions\r
+\r
+/**    Functions for creating miniscule brains:\r
+*/\r
+\r
+import Footballer\r
+\r
+//     The core functions that do not require a memory:\r
+returnAI`                      :: !FootballerAction -> FootballerAI`   // just return the action\r
+halt`                          ::                      FootballerAI`   // halt lets the footballer stand quite still\r
+rotate`                                :: !Angle            -> FootballerAI`   // rotate over given angle\r
+ahead`                         :: !Velocity         -> FootballerAI`   // follow your nose with given velocity/\r
+fix`                           :: !Position !Metre  -> FootballerAI`   // fix p d lets the footballer run to p, with a precision of d\r
+kick`                          :: !Position         -> FootballerAI`   // kick p lets the footballer kick the ball to position p, if in kicking range\r
+track_ball`                    :: !Metre            -> FootballerAI`   // track_ball` d lets the footballer move to the ball, with a precision of d\r
+\r
+amnesia                                :: FootballerAI`     -> FootballerAI m\r
+\r
+//     The derived functions that do not care about their memory (the amnesia versions of the above functions):\r
+returnAI                       :: (FootballerAction -> FootballerAI m)\r
+halt                           :: (                    FootballerAI m)\r
+rotate                         :: (Angle            -> FootballerAI m)\r
+ahead                          :: (Velocity         -> FootballerAI m)\r
+fix                                    :: (Position Metre   -> FootballerAI m)\r
+kick                           :: (Position         -> FootballerAI m)\r
+track_ball                     :: (Metre            -> FootballerAI m)\r
+\r
+centerOfGoal           :: !Home !FootballField -> Position\r
+(team)      infix 9    :: !Footballer ![Footballer] -> [Footballer]\r
+(opponents) infix 9    :: !Footballer ![Footballer] -> [Footballer]\r
+\r
+getBall                                :: !BrainInput -> Football\r