diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-30 13:14:58 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-30 13:14:58 +0100 |
| commit | f42a6ac20b9f14fd391269cd90606d91a592b2f1 (patch) | |
| tree | a432460e6f16da333d66a8b49c773edea1687aab /src/Board.cpp | |
| parent | 159d5334128ff0bb90a8e4e85739dc8bc44baad8 (diff) | |
Cleaning code
Diffstat (limited to 'src/Board.cpp')
| -rw-r--r-- | src/Board.cpp | 8 |
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); } |
