Calculation and visualization
Count king routes around obstacles
Measure a king route in safe moves, not straight-line distance. Remove every square the enemy attacks before counting shortcuts.
Worked example
Position in text
White to move. White: king c3, pawn h2. Black: king h8, pawn h7, pawn d5.
FEN: 7k/7p/8/3p4/8/2K5/7P/8 w - - 0 1
The black d5 pawn attacks c4 and e4. Kc4 is illegal even though it looks like the direct route north. Kb4 goes around that guard and prepares entry toward c5.
A plausible mistake
Do not count a king move through an attacked square as one step. The route fails entirely at that step.
Try it yourself
Position in text
White to move. White: king e3, pawn h2. Black: king h8, pawn h7, pawn d5.
FEN: 7k/7p/8/3p4/8/4K3/7P/8 w - - 0 1
Which first step is legal as a route toward e5: Ke4 or Kf4?
Check your answer
Kf4 is legal. Ke4 steps onto a square attacked by d5. From f4, e5 can be considered on the next white turn, but check whether Black has moved the pawn first.