We have a set of roles and each play sets the amount of robots we need for each role. For an offensive role we generally have more attackers, whereas for a defensive play, we tend to have more defenders. We have some special roles for referee plays, all of whom will be explained below.
Keeper The keeper blocks the ball on the goal line (or with an overshoot) when it is shot at goal.
Defender The defender tries to block their robots from getting the ball by standing in between the ball and their robots. When there is no opponent for a defender, the defender will function as a waller.
Waller NOTE: this role in code is called Defender! Wallers stand on a line between their robot with the ball and our goal. If the ball is traveling, the robot which is most likely going to have the ball is used. The amount of wallers is determined between 2-4 based on the position of the ball. Also, how far in front of our defense area the wallers are standing is determined by the position of the ball. Wallers not in the wall will function as defenders.
Harasser The harasser tries to get the ball. When the ball is traveling, we will use intercept computations to determine whether we can get the ball and where. If their robot has the ball, we either try to take the ball (when they are facing our goal) or stand between them and our goal (when they are facing away from our goal).
Striker The striker shoots the ball on goal.
Formation This role encompasses everything not described above. The role takes in a position and goes there. It is used for attackers (who will find an empty spot in an assigned part of the field) and for plays in which we have a certain formation. When preparing for kickoffs or a penalty for example.
PenaltyKeeper This is a keeper role specifically for penalties, because it has to first stand still until the ball is moved by the opponent.
KeeperPasser This is a keeper role specifically when the ball is in our defense area and the keeper needs to pass it. When the ball is near the edge of the defense area, the keeper will first drag it back and then chip.
BallPlacer During a match, we need to place balls on the spot where the free kick has to be taken from. This is what the ball placer does. He gets the ball and puts it on the ball placement spot.
FreeKickTaker The free kick taker takes the free kick. He either passes or shoots on goal. When time is running out, it chips on goal.
Passer The passer passes the ball to another robot.
PassReceiver The pass receiver receives the pass from another robot.
PenaltyTaker The penalty taker takes the penalty. By driving with the ball and then holding back, it can dribble with the ball. When we almost run out of time or he is close to the goal, he shoots.
Halt Halt is issued by the referee, for example when the human ref has to enter the field. Halted robots can't do anything.