Create a Chess Game with ReactJS - Part 17: Queen setup

preview_player
Показать описание
In this part we add the movement for the queen.

The code in this video can be found on this GitHub repository:

Timestamps:
0:00 Introduction
0:40 Adding queen move function
2:05 Centering the queen
3:30 Logging the queen movements
4:15 Logging diagonal movement
7:00 Adding logic to up movement
10:30 Logic for right bottom and left
15:53 Question: Adding the samePosition function
Рекомендации по теме
Комментарии
Автор

thank u man been following full series and rebuilding side by side

bhanubhutani
Автор

actually there's no need to write logic for queen... we can just return bishopMove(...) || rookMove(...) as queen is just a mixture of bishop and rook... Am i missing something here?

manojvrao
Автор

hey its a great series.... i am following from start now i m on 20th ep.. bt where u add extra rules for king and for castling ...

adityapatil
Автор

why would we need all this for the queen simply add rook or bishop moves?

baraaashraf
join shbcf.ru