Skip to content

Commit

Permalink
master Example 0 -> Example 1
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenbush-wf committed Oct 13, 2015
1 parent fa6920c commit 93b8d93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Example.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package exampleBot;

import battlecode.common.Direction;
import battlecode.common.RobotController;


Expand All @@ -15,6 +16,9 @@ public static void run(RobotController rc) {
while ( true ) {

if ( rc.isActive() ) {
Direction dir = rc.getLocation().directionTo(rc.senseEnemyHQLocation()); // Get the direction to the enemy Base

rc.spawn(dir); // Spawn a robot in that direction!!
}

rc.yield();
Expand Down

0 comments on commit 93b8d93

Please sign in to comment.