tmountain / uchess

♛♔ Play chess against UCI engines in your terminal.
MIT License
64 stars 7 forks source link

Is castling supported #3

Open Bios-Marcel opened 3 years ago

Bios-Marcel commented 3 years ago

I've tried doing castling and it doesn't seem to work.

I've tried the following:

0-0
0-0-0
00
000
o-o
o-o-o
oo
ooo

EDIT

While the readme answers my question, it didn't work nonetheless and I don't understand why. There was nothing inbetween my king and I see no reason why it wouldn't ahve worked. Is it possible to print the actual reason for being unable to move?

tmountain commented 3 years ago

Hi, castling should be fully supported. You can confirm this by testing with the following FEN (specified in your uchess config):

r3k2r/8/8/8/8/8/8/R3K2R w KQkq - 0 1

And then inputting either of the following moves: O-O or O-O-O.

Please note that all of the following conditions are required for a legal castle:

Your king and rook have not moved. Your king is NOT in check. Your king does not pass through check. No pieces between the king and rook.

If you have a board position that meets these criteria, and castling is not working, please provide the FEN (type fen into uchess), and I will be happy to take a look.

Bios-Marcel commented 3 years ago

Hm thanks for the reply. I am quite sure I met the conditions. In my infinite wisdom I forgot to take a picture or anything ^^'

tmountain commented 3 years ago

Ah, no worries, but I'm afraid I can't do much to diagnose it without a board position (at minimum). Move inputs are converted and processed by the notnil/chess package, which has a pretty robust test suite, but there's always a potential for things to get lost in translation. We can leave the issue open if you want to circle back with more data, or we can close it, and you can open a new issue if the problem happens again. I'm fine either way. Thanks!

Bios-Marcel commented 3 years ago

Guess we can close this then. EIther way, is it possible to get more concrete errors instead of just Invalid?

tmountain commented 3 years ago

I'll leave it open and investigate the possibility of doing so. I'll circle back.

Bios-Marcel commented 3 years ago

:+1: