While looking for a 4 leaves clover, here is with 5 (PieceView)

Hopefully I did the pieces part, when I try to see the pieceComponents to check my implementation, I got this image. There are 5 pieces rather than 4, does that indicates a warning or should I continue :?
Ekran görüntüsü 2022-07-04 130735

Thanks in advance
And best wishes with the project to all who reads this.
Bahadir.

This indicates that your equals() method does not work correctly.

1 Like

I might be missing something but I thought this method -in piece implementation- should work; should not it?
I also tried hardcoding (return true/write) and it didn’t change the picture above.
If the method is properly written, where else should I be looking at :?

code removed

Thank you in advance.

That won’t work since it only compares the body by reference, not “by value”. See Arrays (Java Platform SE 7 )