]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Move to_char() and to_string() to notation
[stockfish] / src / position.cpp
index bdbfea8017583fe3b8ca432738bc54a6dec886af..db4c857b0d25401cf97e3f70b56c8aeb10a46ee1 100644 (file)
 
 #include "bitcount.h"
 #include "movegen.h"
-#include "notation.h"
 #include "position.h"
 #include "psqtab.h"
 #include "rkiss.h"
 #include "thread.h"
 #include "tt.h"
+#include "notation.h"
 
 using std::string;
 
@@ -430,17 +430,12 @@ const string Position::fen() const {
 }
 
 
-/// Position::pretty() returns an ASCII representation of the position to be
-/// printed to the standard output together with the move's san notation.
+/// Position::pretty() returns an ASCII representation of the position
 
-const string Position::pretty(Move m) const {
+const string Position::pretty() const {
 
   std::ostringstream ss;
 
-  if (m)
-      ss << "\nMove: " << (sideToMove == BLACK ? ".." : "")
-         << move_to_san(*const_cast<Position*>(this), m);
-
   ss << "\n +---+---+---+---+---+---+---+---+\n";
 
   for (Rank r = RANK_8; r >= RANK_1; --r)
@@ -457,10 +452,6 @@ const string Position::pretty(Move m) const {
   for (Bitboard b = checkers(); b; )
       ss << to_string(pop_lsb(&b)) << " ";
 
-  ss << "\nLegal moves: ";
-  for (MoveList<LEGAL> it(*this); *it; ++it)
-      ss << move_to_san(*const_cast<Position*>(this), *it) << " ";
-
   return ss.str();
 }
 
@@ -1126,10 +1117,6 @@ Value Position::see(Move m) const {
 
 bool Position::is_draw() const {
 
-  if (   !pieces(PAWN)
-      && (non_pawn_material(WHITE) + non_pawn_material(BLACK) <= BishopValueMg))
-      return true;
-
   if (st->rule50 > 99 && (!checkers() || MoveList<LEGAL>(*this).size()))
       return true;