Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
pgnmove.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------+
2 * File: pgnmove.h
3 * Project: part of belofte - A Promising Chess Program
4 * Author: yves
5 * SPDX-License-Identifier: GPL-2.0-only
6+----------------------------------------------------------------------*/
7
8#if !defined(PGNMOVE_H)
9#define PGNMOVE_H
10
11/** PgnMove is for user-interface only */
12class bPgnMove final {
13public:
14 explicit bPgnMove(bPgnMove const& m);
15 explicit bPgnMove(bBoard& b, bMove const& m);
16 explicit bPgnMove(bBoard& b, basicmove_t const bm);
17 ~bPgnMove();
18
19 // no copy or move ctor nor assignment defined
20 bPgnMove& operator=(bPgnMove const&) = delete;
21 bPgnMove(bPgnMove&&) = delete;
23
24private:
25 void ctor(bBoard& b, bMove const& m); /// embedded base constructor
26
27public:
28 operator std::string() const;
29 std::string const& getMoveEvalStr() const { return m_evalstr; }
30
31private:
32 friend bool operator==(bPgnMove const& lhs, std::string const& rhs);
33 friend std::ostream& operator<<(std::ostream& os, bPgnMove const& m);
34
35private:
36 std::string const getPromotionDecorationStr(ppiece_t const piece) const;
37
38 std::string m_move;
39 std::string m_evalstr;
40};
41
42//-----------------------------------------------------------------------
43
44class bPgnMoveList final {
45public:
47 explicit bPgnMoveList(bBoard& b);
49
50private:
51 friend std::ostream& operator<<(std::ostream& os, bPgnMoveList const& mpl);
52
53private:
54 std::vector<bPgnMove> m_pmoves;
55};
56
57#endif // defined PGNMOVE_H
58
59// eof
uint16_t basicmove_t
Definition belofte.h:107
board
Definition board.h:147
Definition move.h:69
PgnMove is for user-interface only.
Definition pgnmove.h:12
bPgnMove & operator=(bPgnMove &&)=delete
bPgnMove(bPgnMove &&)=delete
friend bool operator==(bPgnMove const &lhs, std::string const &rhs)
Definition pgnmove.cpp:151
std::string const & getMoveEvalStr() const
Definition pgnmove.h:29
friend std::ostream & operator<<(std::ostream &os, bPgnMove const &m)
Definition pgnmove.cpp:157
bPgnMove & operator=(bPgnMove const &)=delete
friend std::ostream & operator<<(std::ostream &os, bPgnMoveList const &mpl)
Definition pgnmove.cpp:185
enum tPPiece ppiece_t
Definition piece.h:52