소스 검색

Fix method not found in Checkers

Vsevolod Levitan 10 달 전
부모
커밋
ec1840aced
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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();