///////////////////////////////////////////////////////////// // moveAway() // private static boolean moveAway(MapLocation center) throws GameActionException { while (!rc.isCoreReady()) { Clock.yield(); } Direction dir = center.directionTo(rc.getLocation()); int c = 0; while (!rc.canMove(dir)) { dir = dir.rotateRight(); c++; if (c >= 4) return false; } rc.move(dir); return true; }