Attack preview and creating a referee component is what we are going to create in this episode of creating a chess game with React using TypeScript. By creating the referee component we can split the game logic (referee) and the UI (user interface) logic (chessboard)
The code in this video can be found on the Frontend Coding GitHub repository:
https://github.com/FrontendCodingYT/c...
Timestamps:
0:00 Welcome! Demo of what we are going to create.
0:44 Coding! Creating Referee component.
2:20 Coding! Referee functions.
4:10 Coding! Passing them to the chessboard.
6:25 Coding! Moving pieces state.
10:42: Coding! Moving referee logic.
17:26 Coding! Fixing the references.
21:10 Coding! Play move return value.
22:55 Coding! Moving the pawn promotion section.
26:07 Demo! Is it still working?
26:30 Coding! Fixing more references.
29:02 Demo! It works again
30:25 Coding! Improving the move preview.
32:40 Coding! Styling attack circle.
38:00 Coding! Small bug fix for preview moves.
38:30 Thanks for watching! See you next time :)