Last active
August 29, 2017 18:10
-
-
Save Ravenslofty/702f82563f81e2a7c40a7be3f521f8b8 to your computer and use it in GitHub Desktop.
mailbox movegen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int * vector = dirs[<piece>]; | |
while (*vector != 0) { | |
int nextsq = currsq + *vector; | |
while (board[nextsq] != OFFBOARD) { | |
AddMove(currsq, nextsq, <whatever>); | |
if (board[nextsq] != EMPTY || !slide[<piece>]) | |
break; | |
nextsq += *vector; | |
} | |
*vector++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment