Initial commit of MPLABX version
This commit is contained in:
commit
d80b03bdf0
10 changed files with 251 additions and 0 deletions
31
Board.hpp
Normal file
31
Board.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* File: Board.hpp
|
||||
* Author: amr
|
||||
*
|
||||
* Created on July 30, 2025, 9:20 PM
|
||||
*/
|
||||
|
||||
#ifndef BOARD_HPP
|
||||
#define BOARD_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include "Piece.hpp"
|
||||
class Piece;
|
||||
class Board {
|
||||
private:
|
||||
std::vector<std::vector<Piece *>> boardGrid;
|
||||
|
||||
public:
|
||||
Board();
|
||||
~Board();
|
||||
void setupInitialPosition();
|
||||
Piece *getPieceAt(int x, int y) const;
|
||||
void movePiece(int fromX, int fromY, int toX, int toY);
|
||||
bool isInBounds(int x, int y) const;
|
||||
uint64_t serialBoard = 0xFFFF00000000FFFF; // opening position
|
||||
void deserializeBoard(uint64_t incomingBoard);
|
||||
};
|
||||
|
||||
#endif // BOARD_HPP
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue