+/// Position::do_setup_move() makes a permanent move on the board.
+/// It should be used when setting up a position on board.
+/// You can't undo the move.
+
+void Position::do_setup_move(Move m) {
+
+ StateInfo newSt;
+
+ do_move(m, newSt);
+
+ // Reset "game ply" in case we made a non-reversible move.
+ // "game ply" is used for repetition detection.
+ if (st->rule50 == 0)
+ st->gamePly = 0;
+
+ // Update the number of plies played from the starting position
+ startPosPlyCounter++;
+
+ // Our StateInfo newSt is about going out of scope so copy
+ // its content inside pos before it disappears.
+ detach();
+}
+