private boolean moveToParts() throws GameActionException { if (castleMove.getTarget() == null || round - lastMove < 3) { return false; } Direction toMove = castleMove.getNextDirToTarget(); if (castleMove.canMove(toMove)) { move(toMove); return true; } return false; }
private boolean randomMove() throws GameActionException { // prereqs if (soldiersFiring || soldiersDamaged || round - lastMove < 3) { return false; } Direction rand = MapUtils.randomDirection(id, round); if (rc.canMove(rand) && castleMove.canMove(rand)) { move(rand); return true; } return false; }