Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The game replayer would need to keep track of each pawn's starting file though (including after promotions).

That seems unnecessary. Don’t index the pieces based on their type and where they started — index them based on their current location. So the piece the lexicographically first (rank, file) is piece 0, and 4 bits trivially identifies a piece once you know the color.



True, I hadn't thought of that.




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

Search: