e10bc7f69f7913761efb5be673f12a66f7f1022f
[fp1415-soccerfun.git] / src / StdTeam / Team_Student_Rounds_Assignment.icl
1 implementation module Team_Student_Rounds_Assignment
2
3 /** Implement a solution to the rounds running assignment.
4
5 Your team consists of one player.
6 Below you only need to change the definition of footballer to your solution.
7 Do not change the position and player identification.
8 Do not change the implementation of base_TeamName_Student_Rounds.
9 */
10 import Footballer
11
12 Team_Student_Rounds :: !Home !FootballField -> Team
13 Team_Student_Rounds home field = if (home == West) team (mirror field team)
14 where
15 team = [ {footballer {clubName=club,playerNr=nr} & pos = toPosition (scale x field.flength,scale y field.fwidth)}
16 \\ (x,y) <- positions
17 & nr <- [2..]
18 ]
19 club = base_TeamName_Student_Rounds +++ if (home==West) "_W" "_E"
20 positions = [(-0.49,0.00)]
21 footballer playerID = {defaultFootballer playerID &
22 name = "Peter88",
23 brain = {memory = Void, ai = mind}}
24
25 base_TeamName_Student_Rounds :: String
26 base_TeamName_Student_Rounds = "Student Rounds"
27
28 :: Memory :== Void
29
30 mind :: !(!BrainInput, !Memory) -> (!BrainOutput, !Memory)
31 mind ({football, others, me}, memory) = (Move zero zero)