Java Chess Programming Video #13 The King

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

Chess Code Repository :

IDE:

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

Hey man, brilliant series, I wanted to ask, I would really love to use this as base for implementing my bughouse chess engine(the engine you created is only used as a template and learning method for me as I will change it a bunch), is that ok with you ? I am familiar with java and the series suits me. Hit me up in here, merry xmas.

loplok
Автор

hi, when the attacked piece is the enemy king should we add it to the legal move array?

mariusstefanscarlat
Автор

I think King is simply Queen but only for 1 step. It can be implemented by copying all the code from Queen and removing the loop where we keep adding moves. Correct me if I'm wrong.

DishantKapadiya
Автор

By the definitions of the rules, we cannot place the king in a position where it can be "sacrificed", shouldn't there be a method that prevents a move like this from occurring?

luisvictoria
Автор

+Software Architecture & Design
Hi amir !! for suppose if the king is in 8x8th position(8th row- 8th column)
Just want to know why you have not included
candidateOffset=8 in isEigthRowExclusion()?

rahulmudupurigeek
Автор

I could not castle, did you stop working on that?

Автор

there is the first row and last row exclusion too.

kevin.afton_
Автор

Where do I define the CASTLING move for the king. It requires the movement of both the Rook and the King so, how am I supposed to handle it. Could you suggest some way or has it been covered later in the series.

chakradharreddy