Java Chess Programming Video #25 The Move (Part V)

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

Chess Code Repository :

IDE:

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

This entire project has been a great learning experience. Thanks for putting this out, Amir! Hopefully there are other projects still to come!

themanforallseasons
Автор

Hello Amir .. Thank you for this helpful tutorial :)
I just have a little question, why in the overridden hashCode() method we didn't consider the board like : result = 31 * result + board.hashCode() ; ?

daniarefaie
Автор

Why didn't you use the overridden hash code method when overriding the equals method?

somepineaple
Автор

Since the execute method on superclass is almost identicaI, I think that we lose one of the benefits of inheritance, the ability to reuse code. Wouldn't it be better if the execute method of the super class had only the 2 foreach loops (setting all the other pieces) and the subclasses called super.execute() and then add to the board the changes that we want? Or this wouldn't work because the execute method of the superclass would already build the board? If that is the case, then maybe the superclass could have a method that returns a Builder object and on the subclasses we would apply the changes and build it. Thanks for the awesome tutorials!

Pspet
join shbcf.ru