1 definition module RefereeFunctions
3 /** Functions for creating miniscule refereeing brains:
8 /** ball_left_field_at field:
9 if the ball left the field, it returns (Just edge location) of the field where that happened;
10 if the ball is inside the field, Nothing is returned.
12 ball_left_field_at :: !FootballField -> RefereeAI` (Maybe Position)
14 /** ball_in_goal field:
15 if the ball is in a goal, it returns the home of the field where the ball is;
16 if the ball is not in a goal, Nothing is returned.
18 ball_in_goal :: !FootballField -> RefereeAI` (Maybe Home)
20 /** half_of_game total_playing_time:
21 returns which half of the game is currently being played, assuming that @total_playing_time
22 is the correct time of the entire match.
24 half_of_game :: !PlayingTime -> RefereeAI` Half
26 /** offside_players field home:
27 returns the players from @home that are in offside position.
29 players_in_offside_position :: !FootballField !Home -> RefereeAI` (AssocList FootballerID Position)