Przeglądaj źródła

Fix method not found in Checkers

Vsevolod Levitan 10 miesięcy temu
rodzic
commit
ec1840aced
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Checkers/Checkers/CheckerBoard.cpp

+ 2 - 2
Checkers/Checkers/CheckerBoard.cpp

@@ -32,10 +32,10 @@ CheckerBoard CheckerBoard::loadFromFile(string filename)
         {
             // If the checker position starts with M (which marks a king), skip the first character of the position and create a king
             if (line[0] == 'M')
-                board.placeChecker(CheckerPosition(line.substr(1, 2)), color == WHITE ? CheckerPiece::WHITE_KING : CheckerPiece::BLACK_KING);
+                board.setCheckerAt(CheckerPosition(line.substr(1, 2)), color == WHITE ? CheckerPiece::WHITE_KING : CheckerPiece::BLACK_KING);
             // otherwise, use full position string and create a regular checker
             else
-                board.placeChecker(CheckerPosition(line), color == WHITE ? CheckerPiece::WHITE : CheckerPiece::BLACK);
+                board.setCheckerAt(CheckerPosition(line), color == WHITE ? CheckerPiece::WHITE : CheckerPiece::BLACK);
         }
     }
     file.close();