chesskit-app / chesskit-swift

♟️ Swift package for implementing chess logic.
MIT License
7 stars 6 forks source link

Added U-FE0E variant selector and implemented logic for draw by insufficient material condition #26

Closed joee-ca closed 1 month ago

joee-ca commented 1 month ago

1- Added a U-FE0E variant selector that forces the device to show the Unicode version of the black pawn instead of the emoji 2- Implemented the logic behind draw by insufficient material condition

You will find more information in the commits and in the code comments 😄

joee-ca commented 1 month ago

I made the changes you requested, but I have a doubt: what's the actual difference between pieceSet.get(.kind) and pieceSet.kind? Don't they both return a bitboard for that specific piece kind?

Tell me if there is something off. Tomorrow I will make the tests.

pdil commented 1 month ago

I made the changes you requested, but I have a doubt: what's the actual difference between pieceSet.get(.kind) and pieceSet.kind? Don't they both return a bitboard for that specific piece kind?

Tell me if there is something off. Tomorrow I will make the tests.

Yeah, you're correct, they're both two different ways to do the same thing 😅. And thanks for the changes, I will take a look.

joee-ca commented 1 month ago

I just implemented the test for the insufficient material check. I don't like the way it came out, but it works. Any advice would be appreciated (it's my first time writing tests).

P.S: sorry if the last 2 commits are the same, I made a bit of a mess 😅