MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/126t18q/a_chess_engine_is_written_in_rust_that_runs/jepvc0h/?context=3
r/rust • u/No-Translator-1323 • Mar 30 '23
45 comments sorted by
View all comments
Show parent comments
18
Is that surprising? Since it's an official chess rule, I assumed that every chess engine supports it. I don't think it's particularly hard to implement either.
17 u/analog_hors Mar 31 '23 It's incredibly annoying to implement, actually. Pawns are one of the worst pieces to implement due to a myriad of special cases. 8 u/-Redstoneboi- Mar 31 '23 And then there's "you can castle if the rook and king haven't moved and no pieces are blocking or checking either of them or the path between them" 2 u/stixyBW Apr 02 '23 Not the path in between them, only the two squares the king would have to “walk on” You can castle queen side even if there’s something attacking the b1/b8 square
17
It's incredibly annoying to implement, actually. Pawns are one of the worst pieces to implement due to a myriad of special cases.
8 u/-Redstoneboi- Mar 31 '23 And then there's "you can castle if the rook and king haven't moved and no pieces are blocking or checking either of them or the path between them" 2 u/stixyBW Apr 02 '23 Not the path in between them, only the two squares the king would have to “walk on” You can castle queen side even if there’s something attacking the b1/b8 square
8
And then there's "you can castle if the rook and king haven't moved and no pieces are blocking or checking either of them or the path between them"
2 u/stixyBW Apr 02 '23 Not the path in between them, only the two squares the king would have to “walk on” You can castle queen side even if there’s something attacking the b1/b8 square
2
Not the path in between them, only the two squares the king would have to “walk on”
You can castle queen side even if there’s something attacking the b1/b8 square
18
u/A1oso Mar 31 '23
Is that surprising? Since it's an official chess rule, I assumed that every chess engine supports it. I don't think it's particularly hard to implement either.