/** * Returns true if the recorded tracking direction indicates that bugging from here to the goal is * impossible. Specifically, if you are bugging past the same location with the opposite direction * and orientation, it returns true. * * @param here * @param dir * @param CW * @return */ public boolean checkTrackingDirection(MapLocation here, Direction dir, boolean CW) { int directionNum = dir.opposite().ordinal(); if (directionNum >= 8) { return false; } if (CW) { directionNum += 8; } if (directionsHash == null) { Logger.debug_printAntony("seriously what the f**k..."); } return directionsHash[here.x % HASH_WIDTH][here.y % HASH_HEIGHT][directionNum]; }
public void broadcastFromQueue() { if (myBCC != null && !myBCC.isActive()) { Message nextMessage = getFromQueue(); if (nextMessage != null) { try { myBCC.broadcast(nextMessage); } catch (Exception e) { Logger.debug_printExceptionMessage(e); } } } }
public void addBCC(BroadcastController newBCC) { if (myBCC != null) { int currentRange = myBCC.type().range; int newRange = newBCC.type().range; if (newRange > currentRange) { myBCC = newBCC; } } else { myBCC = newBCC; } Logger.debug_printSashko(myBCC.toString()); }