src/thecat/RobotPlayer.java
public static void run(RobotController rc) throws GameActionException {

		// This is the RobotController object. You use it to perform actions
		// from this robot,
		// and to get information on its current status.
		RobotPlayer.rc = rc;
		
		// Save the Team of the Robot and the Opponents
		ally = rc.getTeam();
		opponent = ally.opponent();
		
		// Get the Initial Archon Locations
		initialArchonLocations = new MapLocation[2][];
		initialArchonLocations[ally.ordinal()] = rc.getInitialArchonLocations(ally);
		initialArchonLocations[opponent.ordinal()] = rc.getInitialArchonLocations(opponent);
		
		// Save the Number of Archons per Team
		numberOfArchons = initialArchonLocations[0].length;
		
		//Debug.debug_println("Startup Bytecosts: " + Clock.getBytecodeNum());

		// Here, we've separated the controls into a different method for each
		// RobotType.
		// You can add the missing ones or rewrite this into your own control
		// structure.
		switch (rc.getType()) {
		case ARCHON:
			Archon.run();
			break;
		case GARDENER:
			Gardener.run();
			break;
		case SOLDIER:
			Soldier.run();
			break;
		case LUMBERJACK:
			Lumberjack.run();
			break;
		case SCOUT:
			Scout.run();
			break;
		case TANK:
			Tank.run();
			break;
		default:
			break;
		}
	}
/**
	 * run() is the method that is called when a robot is instantiated in the
	 * Battlecode world. If this method returns, the robot dies!
	 **/
run() is the method that is called when a robot is instantiated in the
Battlecode world. If this method returns, the robot dies!
run () is the method that is called when a robot is instantiated in the Battlecode world . If this method returns the robot dies!
public static void run(RobotController rc) throws GameActionException {
		RobotPlayer.rc = rc;
		ally = rc.getTeam();
		opponent = ally.opponent();
		initialArchonLocations = new MapLocation[2][];
		initialArchonLocations[ally.ordinal()] = rc.getInitialArchonLocations(ally);
		initialArchonLocations[opponent.ordinal()] = rc.getInitialArchonLocations(opponent);
		numberOfArchons = initialArchonLocations[0].length;
		switch (rc.getType()) {
		case ARCHON:
			Archon.run();
			break;
		case GARDENER:
			Gardener.run();
			break;
		case SOLDIER:
			Soldier.run();
			break;
		case LUMBERJACK:
			Lumberjack.run();
			break;
		case SCOUT:
			Scout.run();
			break;
		case TANK:
			Tank.run();
			break;
		default:
			break;
		}
	}
public static void run ( RobotController rc ) throws GameActionException { RobotPlayer . rc = rc ; ally = rc . getTeam ( ) ; opponent = ally . opponent ( ) ; initialArchonLocations = new MapLocation [ 2 ] [ ] ; initialArchonLocations [ ally . ordinal ( ) ] = rc . getInitialArchonLocations ( ally ) ; initialArchonLocations [ opponent . ordinal ( ) ] = rc . getInitialArchonLocations ( opponent ) ; numberOfArchons = initialArchonLocations [ 0 ] . length ; switch ( rc . getType ( ) ) { case ARCHON : Archon . run ( ) ; break ; case GARDENER : Gardener . run ( ) ; break ; case SOLDIER : Soldier . run ( ) ; break ; case LUMBERJACK : Lumberjack . run ( ) ; break ; case SCOUT : Scout . run ( ) ; break ; case TANK : Tank . run ( ) ; break ; default : break ; } }
run() is the method that is called when a robot is instantiated in the
 Battlecode world.
run () is the method that is called when a robot is instantiated in the Battlecode world .
// This is the RobotController object. You use it to perform actions // from this robot, // and to get information on its current status. // Save the Team of the Robot and the Opponents // Get the Initial Archon Locations // Save the Number of Archons per Team //Debug.debug_println("Startup Bytecosts: " + Clock.getBytecodeNum()); // Here, we've separated the controls into a different method for each // RobotType. // You can add the missing ones or rewrite this into your own control // structure.