Java Chess Programming Video #8 The Rook

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

Chess Code Repository :

IDE:

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

This is such a good series when is the next video coming out?!

wuptopful
Автор

Thank you. Great source for making a chess engine. I am trying to convert it to antichess(losing chess). Do you think is it diffucult to do it? I would be glad for any advice!

ruxru
Автор

you said knight and copied from bishop.. had me confused there for 5 sec .. XD .. love this series BTW

hiteshchalise
Автор

loving the series!

One question, why is there no first/eighth row exclusion?

ronborneo
Автор

So far the Bishop, Rook, and Knight classes have a lot of duplicate code in the "calculateLegalMoves" method (while a coordinate is valid, chack for exclusions, apply offset, get the tile, check if occupied, add to moves if it's not, check alliance if it is..). Wouldn't it be better to have the part that is the same for every piece in a separate "MoveRules" class or something?
I'm thinking, what if I for whatever reason wanted to change how legal moves work, like for example I want to be able to capture friendly pieces as well? Then I would have to go into every single piece class and edit the alliance part.
If that rule is defined somewhere just once, then I only have to change it there.

Sorry if you do that at a later stage in the series. I just started watching and I'm enjoying it so far.

Wuzzysbrand
Автор

If we are already operating in a while loop that runs as long as the tile is valid, why do we have an additional if statement after the exclusions that confirms the same thing?

Nreneau
Автор

What about capturing pieces? Wouldn't those also be exception cases?

InfiniteUniverse