Pawn
A pawn moves forward one square. A pawn captures one square diagonally forward.
Pawn moves forward
White pawn is on e2. It may move to e3 or to e4, because e2 is its starting square.
FEN: 4k3/8/8/8/8/8/4P3/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 . . . . P . . . 2
1 . . . . K . . . 1
a b c d e f g hPawn captures diagonally
White pawn is on e5. Black pawn is on d6. White may capture on d6, because the capture is one square diagonally forward.
FEN: 4k3/8/3p4/4P3/8/8/8/4K3 w - - 0 1
a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . p . . . . 6
5 . . . . P . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . K . . . 1
a b c d e f g hPawn promotion
White pawn is on b7. It moves to b8 and must become a new piece.
FEN: 4k3/1P6/8/8/8/8/8/4K3 w - - 0 1
a b c d e f g h
8 . . . . k . . . 8
7 . P . . . . . . 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . K . . . 1
a b c d e f g hKey points
- A pawn on its starting square may move forward one square or two squares.
- A pawn never moves backward. A pawn never moves sideways except when it captures.
- A pawn captures one square diagonally forward. A pawn cannot capture straight forward.
- A pawn that reaches the last rank must promote. Promotion is explained in its own lesson.
- A pawn that stands in front of another piece cannot move forward.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
White pawn is on e2. Which move is legal?