Insyder01

Moves.h

Jan 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.17 KB | None | 0 0
  1. #ifndef MOVES_H
  2. #define MOVES_H
  3. #include <vector>
  4. using std::vector;
  5. const int NUMBER_OF_SQUARES(64);
  6. /**WHY VECTOR PROBLEM**/
  7. /**
  8. 0  1  2  3  4  5  6  7
  9. 8  9  10 11 12 13 14 15
  10. 16 17 18 19 20 21 22 23 always black
  11. 24 25 26 27 28 29 30 31
  12. 32 33 34 35 36 37 38 39
  13. 40 41 42 43 44 45 46 47
  14. 48 49 50 51 52 53 54 55 always white
  15. 56 57 58 59 60 61 62 63
  16. **/
  17. /**
  18. TO-DO handling special moves Castling , Pawn Promotion, En Passant
  19.  
  20. **/
  21. class Moves{
  22.  
  23.  
  24.     vector <vector < int > > whitePawnsMoves;
  25.  
  26.     vector <vector < int > > blackPawnsMoves;
  27.  
  28.     vector <vector < int > > knightMoves;
  29.  
  30.     vector <vector < int > > blackBishopMoves;
  31.  
  32.     vector <vector < int > > whiteBishopMoves;
  33.  
  34.     vector <vector < int > > rookMoves;
  35.  
  36.     vector <vector < int > > queensMoves;
  37.  
  38.     vector <vector < int > > kingMoves;
  39.  
  40.  
  41.     void genWhitePawnsMoves();
  42.     void genBlackPawnsMoves();
  43.     void genKnightMoves();
  44.     void genBlackBishopMoves();
  45.     void genWhiteBishopMoves();
  46.     void genRookMoves();
  47.     void genQueenMoves();
  48.     void genKingMoves();
  49.  
  50.     bool valid(int x, int y);
  51.     int to64Square(int x, int y);
  52. public:
  53.         Moves();
  54. };
  55. #endif // MOVES_H
Advertisement
Add Comment
Please, Sign In to add comment