initial framework added
[fp1415-soccerfun.git] / src / Game / FootballerFunctions.dcl
1 definition module FootballerFunctions
2
3 /** Functions for creating miniscule brains:
4 */
5
6 import Footballer
7
8 // The core functions that do not require a memory:
9 returnAI` :: !FootballerAction -> FootballerAI` // just return the action
10 halt` :: FootballerAI` // halt lets the footballer stand quite still
11 rotate` :: !Angle -> FootballerAI` // rotate over given angle
12 ahead` :: !Velocity -> FootballerAI` // follow your nose with given velocity/
13 fix` :: !Position !Metre -> FootballerAI` // fix p d lets the footballer run to p, with a precision of d
14 kick` :: !Position -> FootballerAI` // kick p lets the footballer kick the ball to position p, if in kicking range
15 track_ball` :: !Metre -> FootballerAI` // track_ball` d lets the footballer move to the ball, with a precision of d
16
17 amnesia :: FootballerAI` -> FootballerAI m
18
19 // The derived functions that do not care about their memory (the amnesia versions of the above functions):
20 returnAI :: (FootballerAction -> FootballerAI m)
21 halt :: ( FootballerAI m)
22 rotate :: (Angle -> FootballerAI m)
23 ahead :: (Velocity -> FootballerAI m)
24 fix :: (Position Metre -> FootballerAI m)
25 kick :: (Position -> FootballerAI m)
26 track_ball :: (Metre -> FootballerAI m)
27
28 centerOfGoal :: !Home !FootballField -> Position
29 (team) infix 9 :: !Footballer ![Footballer] -> [Footballer]
30 (opponents) infix 9 :: !Footballer ![Footballer] -> [Footballer]
31
32 getBall :: !BrainInput -> Football