🎓 A1Learner
🔍
0 of 52 lessons completed

King

A king moves one square in any direction. A king may never move into check.

King from its starting square

White king is on e1. After the pieces around it move, the king can step to a neighbouring square.

FEN: 4k3/8/8/8/8/8/8/4K3 w - - 0 1

a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . K . . . 1
  a b c d e f g h

King in the center

White king is on e4. It can move to any of the eight squares around e4.

FEN: 4k3/8/8/8/4K3/8/8/8 w - - 0 1

a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . . K . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . . . . . 1
  a b c d e f g h

King captures

White king is on e4. Black pawn is on f5. White may capture on f5, because f5 is a neighbouring square.

FEN: 4k3/8/8/5p2/4K3/8/8/8 w - - 0 1

a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . . . p . . 5
4 . . . . K . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . . . . . 1
  a b c d e f g h

Key points

  • A king moves one square along a file, a rank, or a diagonal.
  • A king captures by landing on an enemy piece on a neighbouring square.
  • A king may never move to a square that an enemy piece attacks.
  • A king may never stay in check. Getting out of check is explained in its own lesson.
  • The king is the most important piece. Losing the king by checkmate loses the game.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Rust Playground

Exercise

White king is on e1. Which move is legal?