summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8b88ca9)
First, remove some dead code (function never called with a Move argument).
Then, remove printing of legal moves, which does not belong here. Let's keep commands orthogonal and minimal:
- the "d" command should display the board, nothing more, or less.
- "perft 1" will display the list of legal moves.
No functional change.
#include "bitcount.h"
#include "movegen.h"
#include "bitcount.h"
#include "movegen.h"
#include "position.h"
#include "psqtab.h"
#include "rkiss.h"
#include "position.h"
#include "psqtab.h"
#include "rkiss.h"
-/// 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 {
- 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)
ss << "\n +---+---+---+---+---+---+---+---+\n";
for (Rank r = RANK_8; r >= RANK_1; --r)
for (Bitboard b = checkers(); b; )
ss << to_string(pop_lsb(&b)) << " ";
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) << " ";
-
// Text input/output
void set(const std::string& fenStr, bool isChess960, Thread* th);
const std::string fen() const;
// Text input/output
void set(const std::string& fenStr, bool isChess960, Thread* th);
const std::string fen() const;
- const std::string pretty(Move m = MOVE_NONE) const;
+ const std::string pretty() const;
// Position representation
Bitboard pieces() const;
// Position representation
Bitboard pieces() const;