2 ms·
That's not what I wrote, you duplicate the king ID in the position of each castle-able rook.
by skupig 3y ago
That's not what I wrote, you duplicate the king ID in the position of each castle-able rook.
- xpe 3y agoSeems like I’m not following your specific id mapping.
- teo_zero 3y agoI rhink the concept is: in the initial position you have three kings: in a1, e1 and h1. Once the left rook is moved, it will be encoded as rook and not as a king anymore. Same for the right one. If you move the king, both rooks will be encoded as rooks and not as king anymore. Decoding is easy: if there's more than one king, one must be in e1: that's the real one, the others are actually rooks.