Pawns move only forward: up the board for white, down for black. Writing that as a dir of -1 or 1 lets one
piece of code serve both colors. A pawn steps onto an empty square ahead, and from its starting row it may step two
if both squares are empty.
```js
if (kind === 'P') {
const dir = color === 'w' ? -1 : 1
if (!board[r + dir][c]) {
add(r, c, r + dir, c)
const start = color === 'w' ? 6 : 1
if (r === start && !board[r + 2 * dir][c]) add(r, c, r + 2 * dir, c)
}
}
```
What it means
dir is -1 for white (up) and 1 for black (down).
!board[r + dir][c]: ! means "not", so this is true when the square ahead is empty.
The two-square move is inside that if: it needs the first square empty too, and the pawn on its starting row
(6 for white, 1 for black).
Your turn
Under the slide block (after its closing }), write the pawn block.