Java Chess Programming Video #11 The Pawn (Part II)

preview_player
Показать описание

Chess Code Repository :

IDE:

Reading Material:
Рекомендации по теме
Комментарии
Автор

"Whoops, wrong tab", ':D

Tripwick
Автор

Since a pawn cannot backtrack why make a separate field for checking if it a first move just the fact that it is a white pawn on the 2nd rank or black pawn on the 7th rank should do the job?.. And this is a wonderful series I absolutely love it

hitanshshah
Автор

Thank you for this series!

Small detail: line 39 - 41 (@ 7:00) needs extra brackets at the start of line 40 & end of 41, IMHO:

false && false && false || true = true.
I think you want: false && false && (false || true) = false..?

rutgerspaans
Автор

Why isn't it enough to check for isFirstMove of a pawn piece?

chikken
Автор

nobody saw anything about the wrong tab you owned wtf

thebutterflyNL
Автор

I feel there is a bug in the condition after the || You should rewrite this line of code currentCandidateOffset == 16 because the two-square-forward condition must be executed.

blue_Tarkan
Автор

Is it necessary to clarify that it must be on a specific row to qualify for the first move "jump" wouldn't the first move rule be sufficient? Then you could use the same "Jump" rule in alternative versions of chess where the pawn might not start on the same rows.

Tripwick
Автор

I think if the pawn is in the second or seventh row then it is not moving which means it is the first move, so does it need isFirstMove in, I find it redundant

-phamquangat