Created
November 15, 2010 02:14
-
-
Save nagat01/676333 to your computer and use it in GitHub Desktop.
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
#define BishopAttacks(sq,occ) | |
(MagicAttacks[ | |
BOffset[(sq)] + | |
(((BMagicMask[(sq)] & (occ)) * BMagic[(sq)]) >> BShift[(sq)]) | |
]) | |
#define RookAttacks(sq,occ) | |
(MagicAttacks[ | |
ROffset[(sq)] + | |
(((RMagicMask[(sq)] & (occ)) * RMagic[(sq)]) >> RShift[(sq)]) | |
]) | |
#define QueenAttacks(sq,occ) (BishopAttacks(sq,occ) | RookAttacks(sq,occ)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment