diff --git a/BChessTests/PGNTests.cpp b/BChessTests/PGNTests.cpp index 912c398..e0ff569 100644 --- a/BChessTests/PGNTests.cpp +++ b/BChessTests/PGNTests.cpp @@ -296,7 +296,7 @@ TEST_F(PGN, PGNWithVariation2) { ChessGame game; ASSERT_TRUE(FPGN::setGame(pgn, game)); - ASSERT_EQ(12, game.getNumberOfMoves()); + ASSERT_EQ(3, game.getNumberOfMoves()); auto pgnAgain = FPGN::getGame(game); ASSERT_EQ("1. e4 e5 2. Nc3 (2. Nf3 Nc6 3. Nc3 Nf6) *", pgnAgain); diff --git a/Shared/Engine/Engine/ChessGame.cpp b/Shared/Engine/Engine/ChessGame.cpp index 389e8a4..3f9daf2 100644 --- a/Shared/Engine/Engine/ChessGame.cpp +++ b/Shared/Engine/Engine/ChessGame.cpp @@ -79,8 +79,7 @@ void ChessGame::move(Move move, bool replace) { // the player is playing a series of move that correspond to that PGN. for (int index=0; index