BotByte

Graph Move & Bitmask.cpp

Sep 14th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. /*----------------------Graph Moves----------------*/
  2. //const int fx[]={+1,-1,+0,+0};
  3. //const int fy[]={+0,+0,+1,-1};
  4. //const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
  5. //const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
  6. //const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
  7. //const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
  8. /*------------------------------------------------*/
  9.  
  10. /*-----------------------Bitmask------------------*/
  11. //int Set(int N,int pos){return N=N | (1<<pos);}
  12. //int reset(int N,int pos){return N= N & ~(1<<pos);}
  13. //bool check(int N,int pos){return (bool)(N & (1<<pos));}
  14. /*------------------------------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment