8c0e333f9733ad7ad525794b189e488f78ea8a00
[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 // implement your footballer here
22
23 base_TeamName_Student_Rounds :: String
24 base_TeamName_Student_Rounds = "Student Rounds"