update master
authorMart Lubbers <mart@martlubbers.net>
Mon, 22 Jun 2015 20:19:19 +0000 (22:19 +0200)
committerMart Lubbers <mart@martlubbers.net>
Mon, 22 Jun 2015 20:19:19 +0000 (22:19 +0200)
src/MartLubbers.icl [deleted file]
src/Team_MartLubbers.icl

diff --git a/src/MartLubbers.icl b/src/MartLubbers.icl
deleted file mode 100644 (file)
index 65e62bf..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-implementation module Team_MartLubbers\r
-\r
-import Footballer\r
-\r
-Team_MartLubbers :: !Home !FootballField -> Team\r
-Team_MartLubbers home field = \r
-|      home==West                              = westTeam\r
-|      otherwise                               = eastTeam\r
-where\r
-       eastTeam                                = mirror field westTeam\r
-       westTeam                                = [keeper : fielders]\r
-       clubname                                = base_TeamName_MiniEffie +++ if (home == West) "W" "E"\r
-       keeper                                  = MiniEffie clubname home field {zero & px=scale -0.5 field.flength} 1\r
-       fielders                                = [  MiniEffie clubname home field {px=scale (-0.5*dx) field.flength,py=scale (0.5*dy) field.fwidth} nr\r
-                                                         \\ (dx,dy) <- west_positions_fielders\r
-                                                          & nr      <- [2..]\r
-                                                         ]\r
-       west_positions_fielders = [(0.20, 0.40)\r
-                                                         ,(0.20,-0.40)\r
-                                                         ,(0.23, 0.00) \r
-                                                         ,(0.50, 0.45)\r
-                                                         ,(0.50,-0.45)\r
-                                                         ,(0.60, 0.00)\r
-                                                         ,(0.70, 0.35)\r
-                                                         ,(0.70,-0.35)\r
-                                                         ,(0.90, 0.05)\r
-                                                         ,(0.90,-0.05)\r
-                                                         ]                                                       \r
-\r
-:: MiniMemory                          = { home :: !Home }\r
-\r
-MiniEffie :: !ClubName !Home !FootballField !Position !PlayersNumber -> Footballer\r
-MiniEffie club home field position nr\r
-       = { playerID                    = {clubName=club,playerNr=nr}\r
-         , name                                = "MiniF." <+++ nr\r
-         , length                              = min_length\r
-         , pos                                 = position\r
-         , nose                                = zero\r
-         , speed                               = zero\r
-         , skills                              = (Running, Kicking, Rotating)\r
-         , effect                              = Nothing\r
-         , stamina                             = max_stamina\r
-         , health                              = max_health\r
-         , brain                               = { memory = {home=home}, ai = minibrain field }\r
-         }       \r
-\r
-minibrain :: !FootballField !(!BrainInput,!MiniMemory) -> (!BrainOutput,!MiniMemory)\r
-minibrain field (input=:{referee,me}, memory=:{home})\r
-| i_am_close_to_the_ball\r
-       | i_can_see goal                = (kick_the_ball,     new_memory)\r
-       | otherwise                             = (turn_to_face goal, new_memory)\r
-| i_can_see ball                       = (run_to_the_ball,   new_memory)\r
-| otherwise                                    = (turn_to_face ball, new_memory)       \r
-where\r
-       new_memory                              = {home=if (any isEndHalf referee) (other home) home}\r
-       my_direction                    = me.nose\r
-       ball                                    = getBall input\r
-       goal                                    = centerOfGoal (other home) field\r
-       \r
-       i_am_close_to_the_ball  = dist me ball < maxKickReach me\r
-       i_can_see pos                   = abs (bearing my_direction me pos) < rad (0.05*pi)\r
-\r
-       run_to_the_ball                 = Move {direction=bearing zero me ball,velocity=speed_of_light} zero\r
-       turn_to_face pos                = Move zero (bearing my_direction me pos)\r
-       kick_the_ball                   = KickBall {vxy={direction=my_direction,velocity=speed_of_light}, vz=ms 1.0}\r
-       speed_of_light                  = ms 299792458.0\r
-\r
-base_TeamName_MiniEffie                :: String\r
-base_TeamName_MiniEffie                = "Æsir"        
\ No newline at end of file
index 9537ed1..0b2410f 100644 (file)
@@ -177,4 +177,4 @@ distToLine a b c = (abs (((b.px-a.px)*(a.py-c.py))-((a.px-c.px)*(b.py-a.py))))/d
                d = sqrt(((b.px-a.px)*(b.px-a.px))+((b.py-a.py)*(b.py-a.py)))\r
                \r
 base_TeamName_MartLubbers :: String\r
-base_TeamName_MartLubbers = "Æsir"     
\ No newline at end of file
+base_TeamName_MartLubbers = "Æsir"     \r