From f42a6ac20b9f14fd391269cd90606d91a592b2f1 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 30 Jan 2022 13:14:58 +0100 Subject: Cleaning code --- src/Board.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Board.cpp') 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); } -- cgit v1.2.3