Skip to content

Commit

Permalink
Added BitBoard class with basic masks and starting state
Browse files Browse the repository at this point in the history
  • Loading branch information
mbluemer committed Apr 13, 2017
1 parent 3bb50ee commit 3c81368
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions include/BitBoard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef BIT_BOARD_H
#define BIT_BOARD_H

#include <cstdint>

class BitBoard
{
private:
/* Static bit masks */

// Used to determine whether a move from that direction is valid
static const uint32_t upRight = 0xFBFBEBBA;
static const uint32_t upLeft = 0xFDF9EDBC;
static const uint32_t downRight = 0x79FBF3DB;
static const uint32_t downLeft = 0x7DFDF5DD;

/* Class member variables */
const uint32_t m_blackPieces = 0x41C71C3;
const uint32_t m_whitePieces = 0xE3820C38;
const uint32_t m_kings = 0;

bool m_isBlacksTurn = true;

public:

};

#endif
1 change: 1 addition & 0 deletions src/BitBoard.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "BitBoard.h"

0 comments on commit 3c81368

Please sign in to comment.