]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Retire some unused functions
[stockfish] / src / position.cpp
index 8f70b5dfd3ab3af4c644072396622c75257ce381..91fe7ab4506d9b11c85f626412dbf2be38ae77a0 100644 (file)
@@ -208,7 +208,7 @@ void Position::from_fen(const string& fen, bool isChess960) {
   if (   ((ss >> col) && (col >= 'a' && col <= 'h'))
       && ((ss >> row) && (row == '3' || row == '6')))
   {
   if (   ((ss >> col) && (col >= 'a' && col <= 'h'))
       && ((ss >> row) && (row == '3' || row == '6')))
   {
-      st->epSquare = make_square(file_from_char(col), rank_from_char(row));
+      st->epSquare = make_square(File(col - 'a') + FILE_A, Rank(row - '1') + RANK_1);
 
       // Ignore if no capture is possible
       Color them = opposite_color(sideToMove);
 
       // Ignore if no capture is possible
       Color them = opposite_color(sideToMove);
@@ -1913,7 +1913,7 @@ bool Position::is_ok(int* failedStep) const {
   if (failedStep) *failedStep = 1;
 
   // Side to move OK?
   if (failedStep) *failedStep = 1;
 
   // Side to move OK?
-  if (!color_is_ok(side_to_move()))
+  if (side_to_move() != WHITE && side_to_move() != BLACK)
       return false;
 
   // Are the king squares in the position correct?
       return false;
 
   // Are the king squares in the position correct?
@@ -1927,10 +1927,10 @@ bool Position::is_ok(int* failedStep) const {
 
   // Castle files OK?
   if (failedStep) (*failedStep)++;
 
   // Castle files OK?
   if (failedStep) (*failedStep)++;
-  if (!file_is_ok(initialKRFile))
+  if (!square_is_ok(make_square(initialKRFile, RANK_1)))
       return false;
 
       return false;
 
-  if (!file_is_ok(initialQRFile))
+  if (!square_is_ok(make_square(initialQRFile, RANK_1)))
       return false;
 
   // Do both sides have exactly one king?
       return false;
 
   // Do both sides have exactly one king?