Fewest moves for a chess piece to capture the king
A rectangular board has blocked squares, your piece and the opposing king. Your piece's type decides the directions it may step in, and it can never move onto a blocked square. Return the fewest moves your piece needs to reach the king's square, or report that it cannot.
No answer yet. Write the first one; the best answer gets endorsed.
