a77671d6b3a22448c1e0af54fc341a05da94b545
[fp1415-soccerfun.git] / src / StdTeam / Team_Student_Slalom_Assignment.icl
1 implementation module Team_Student_Slalom_Assignment
2
3 /** Implement a solution to the slalom assignment.
4
5 Your team consists of one field player, with player's number 2.
6 Below you should only 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_Slalom.
9 */
10
11 import Footballer
12 import FootballerFunctions
13
14 Team_Student_Slalom :: !Home FootballField -> Team
15 Team_Student_Slalom home field = team
16 where
17 team = [{footballer {clubName=club,playerNr=2} & pos = if (home == West) position (mirror field position)}]
18 club = base_TeamName_Student_Slalom +++ if (home == West) "_W" "_E"
19 position = {zero & px = scale -0.5 field.flength + penalty_area_depth}
20 footballer player_id = defaultFootballer player_id // implement your footballer here
21
22 base_TeamName_Student_Slalom :: String
23 base_TeamName_Student_Slalom = "Student Slalom"