- Display a chessboard with a default FEN of: 8/2p5/8/8/8/8/8/8 w KQkq - 0 1 (just one black pawn on «C7»)
- Include a button that adds a white pawn to a random legal position on the board.
- Allow that pawn to make legal moves across the board.
- Ideally pawns should not appear on the first row (or the last one)
- There is no need to handle pawn promotion, although that would be bonus points if you do.
- Do not use any 3rd-party chess libraries.
- Return your code in an online executable sandbox, such as https://codesandbox.io/
→→→→→→→→→→ 🔥 Demo 🔥 ←←←←←←←←←←
- Promotion for white pawn to become queen
- Black pawn can moves and eats
- Promotion for black pawn to become queen
- Black and white queen can move and eat