Hacker News new | past | comments | ask | show | jobs | submit login

> All king moves other than castling move the king at most one file, so when you see a king on e1 and the move is e1g1 or e1c2 which is a move of two files you can infer that it must be castling.

Yeah. For some reason I had a brain fart and thought that the two castles moved the king 1 and 2 files, instead of 2 and 3 files, and that made me think you needed to disambiguate a 1 file castle with a 1 file move.

Which is clearly dumb. I blame insufficient coffee.




Both O-O and O-O-O castles move the king by two squares. It gets more interesting if you want to also store fisher random chess, because the casting can involve a king move by any number of swuares or not moving at all. But even in this case the casting could be unambiguously recorded as a move by 2 squares(even if the king doesn't move at all)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: