mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Don't access std::cout from Position::print()
Let the caller to decide where to redirect (cout or cerr) the ASCII representation of the position. Rename the function to reflect this. Renamed also from_fen() and to_fen() to set() and fen() respectively. No functional change.
This commit is contained in:
+4
-4
@@ -93,13 +93,13 @@ class Position {
|
||||
public:
|
||||
Position() {}
|
||||
Position(const Position& p, Thread* t) { *this = p; thisThread = t; }
|
||||
Position(const std::string& f, bool c960, Thread* t) { from_fen(f, c960, t); }
|
||||
Position(const std::string& f, bool c960, Thread* t) { set(f, c960, t); }
|
||||
Position& operator=(const Position&);
|
||||
|
||||
// Text input/output
|
||||
void from_fen(const std::string& fen, bool isChess960, Thread* th);
|
||||
const std::string to_fen() const;
|
||||
void print(Move m = MOVE_NONE) const;
|
||||
void set(const std::string& fen, bool isChess960, Thread* th);
|
||||
const std::string fen() const;
|
||||
const std::string pretty(Move m = MOVE_NONE) const;
|
||||
|
||||
// Position representation
|
||||
Bitboard pieces() const;
|
||||
|
||||
Reference in New Issue
Block a user