diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-27 10:07:47 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-27 10:07:47 +0100 |
| commit | bb5d85cb65247280db97a686ad27d52a6806dabf (patch) | |
| tree | b546eda783f41f70c62e1dfb168df6f909fc0fb0 /src/Board.hpp | |
| parent | 8238444024716cdf344a08434855e772f32685ef (diff) | |
Cleaning code
Diffstat (limited to 'src/Board.hpp')
| -rw-r--r-- | src/Board.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Board.hpp b/src/Board.hpp index a3981bc..2ae49ed 100644 --- a/src/Board.hpp +++ b/src/Board.hpp @@ -11,28 +11,28 @@ class Board { public: /// @brief Check if a square is empty - bool IsEmpty(std::string); + bool IsEmpty(const std::string &coord); /// @brief Add a piece (no checks are performed on coord) - bool AddPiece(char p, std::string); + bool AddPiece(char p, const std::string &coord); /// @brief Remove a piece from a square - bool RemovePiece(std::string); + bool RemovePiece(const std::string &coord); /// @brief Get piece at a specific coordinate - Piece GetPieceAt(std::string); + Piece GetPieceAt(const std::string &coord); /// @brief Get the pieces of a player std::vector<Piece> GetPlayerPieces(bool); /// @brief Count the number of a specific piece on the board short CountPiece(char); /// @brief Return true if at most 1 similar piece can go to move_dst - bool IsPieceMoveUnique(char piece, std::string move_dst); + bool IsPieceMoveUnique(char piece, const std::string &move_dst); /// @brief Get the location of the first king found on the board std::string GetKingLocation(bool); /// @brief Check if a move is technically possible (does not means it is /// legal) - bool IsMovePossible(std::string); + bool IsMovePossible(const std::string &move); /// @brief Clear the board void Clear(); /// @brief Move a piece somewhere no matter what - void Move(std::string); + void Move(const std::string &move); /// @brief Get a serialize version of the board std::string Serialize(); /// @brief List all the technically possible moves of a player |
