Example #1
0
 private boolean pathIsObstructed(Board board, Location currentLocation, Location newLocation) {
   boolean lastValidMove = false;
   if (board.getSquare(newLocation).isOccupied()) {
     if (!newLocation.equals(currentLocation)) {
       lastValidMove = true;
     }
   }
   return lastValidMove;
 }