summaryrefslogtreecommitdiff
path: root/src/Board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Board.cpp')
-rw-r--r--src/Board.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Board.cpp b/src/Board.cpp
index 0e88423..a107c02 100644
--- a/src/Board.cpp
+++ b/src/Board.cpp
@@ -72,8 +72,8 @@ std::string Board::GetKingLocation(bool isBlack) {
}
void Board::Move(std::string move) {
- std::string src(move.substr(0, 2));
- std::string dst(move.substr(2, 2));
+ std::string src = move.substr(0, 2);
+ std::string dst = move.substr(2, 2);
for (Piece &p : pieces) {
if (p.coord == src) {
RemovePiece(dst); // Remove piece on dst if exists
@@ -99,8 +99,8 @@ std::string Board::Serialize() {
}
bool Board::IsMovePossible(std::string move) {
- std::string src(move.substr(0, 2));
- std::string dst(move.substr(2, 2));
+ std::string src = move.substr(0, 2);
+ std::string dst = move.substr(2, 2);
if (src == dst) {
return (false);
}