MyFirstTeam

From Robowiki
Jump to navigation Jump to search
MyFirstTeam
MyFirstTeam.png
Author(s) Mathew Nelson, Flemming N. Larsen
Extends TeamRobot, Droid
Targeting Head-On Targeting
Movement Pattern Movement (MyFirstLeader), No movement (MyFirstDroid)
Code License Eclipse Public License v1.0

Background Information

What's special about it?
MyFirstTeam is a team of one MyFirstLeader and four MyFirstDroid bots. It may be the most complex of all the Sample Bots. It demonstrates:
  • The AdvancedRobot setXXX() methods (e.g. setTurnRadarRight()).
  • Logging to the console with out.println().
  • Calculating enemy coordinates in onScannedRobot() with Robocode trigonometry.
  • Aiming the gun at a given coordinate.
  • Constructing and using auxiliary data classes (Point and RobotColors).
  • Using the TeamRobot communication methods.
  • Having the leader set the entire team's color scheme, by broadcasting a RobotColors object. This allows all robots' colors to be changed just by modifying MyFirstLeader.
How competitive is it?
TeamRumble ‒ APS: 15.76% (42nd), PL: 3-40 (41st), Survival: 10.14%

Strategy

How does it move?
MyFirstLeader moves in the exact same way as MyFirstRobot. MyFirstDroid does not move.
How does it fire?
MyFirstLeader constantly rotates its Radar and broadcasts enemy locations. All MyFirstDroids try to fire 3.0-power bullets at the last coordinate they received.
How does it dodge bullets?
When MyFirstLeader is hit by a bullet, it turns perpendicular to the bullet.
How does the melee strategy differ from one-on-one strategy?
No difference.
How does it select a target to attack/avoid in melee?
No explicit target selection. Each droid tries to fire whenever it receives a coordinate, and if its gun heat happens to be zero, it fires.
What does it save between rounds and matches?
Nothing and nothing.

Additional Information

Where did you get the name?
It's a basic team.
Can I use your code?
Yes, it is released under the Eclipse Public License v1.0.