Комментарии:
why did you make your videos unavailable??????
Ответитьi appreciate people using more and more javascript, keep up the good work!
Ответитьmuito foda, very foda, vou fazer um projeto assim.
ОтветитьI can’t add the svg into my JavaScript file
ОтветитьEverything you provide our community is pure gold!Thank you Ania!!!
ОтветитьImpressive Ania,
Could you make them into all in one game zone including the admin dashboard?
Love from 🇧🇩
Ответитьyour rook's logic is wrong ... i am damn sure
Ответитьcan't decide what is more beautiful, you or the code. So, i watched the video twice, once for the code and second time i just looked at you... So distracting...
ОтветитьYou really should not code logic for figures in that way it is obvious that it is too repetitive and redundant and hard to debug, and when there is repeating you should be using loops.
example for bishop :
case 'bishop':
// Calculate the difference between the target and start squares
const diff = Math.abs(targetId - startId);
// Check if the move is along a diagonal (difference is a multiple of width + 1 or width - 1)
if (diff % (width + 1) === 0 || diff % (width - 1) === 0) {
const step = diff % (width + 1) === 0 ? (width + 1) : (width - 1);
// Determine the direction of the step (positive or negative)
const direction = targetId > startId ? 1 : -1;
// Loop through each square along the diagonal to check for blocking pieces
for (let i = startId + step * direction; i !== targetId; i += step * direction) {
const square = document.querySelector(`[square-id="${i}"]`);
// If a square contains a piece, the path is blocked
if (square.firstChild) {
return false;
}
}
return true;
}
return false;
i thought we would write html and style with grid css
ОтветитьDid you ever do a follow up for check logic? I was thinking of making chess in something (JS made sense so I'd have a GUI), but the thing I was finding the most difficult was determining what moves were legal, mainly due to stuff like pins on the king.
Ответитьi need to pay 499 dollars to access the source code?
ОтветитьThank you Madam !! i was dreaming with this chess program !! i will do it !!
ОтветитьRed and mud-brown?
ОтветитьI've just found one gem of a playlist. Very thankful!
Ответитьté surman 1 trap toa mé ze te ve kom proféseur tte ma vi keur keur lodeur de ta kilot hmmmmmmmm
Ответитьdoes someone have the complete code from this video
Ответить