Belofte version 2.2.0
A promising chess program using the UCI or Winboard interface
coordmove.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------+
2 * File: coordmove.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(COORDMOVE_H)
9#define COORDMOVE_H
10
11/**
12 * simple coordmove, with 4 characters, or 5 characters in case of promotion
13 * mostly used for interface
14 */
15class bCoordMove : public bBasicMove {
16public:
18 : bBasicMove(cm)
19 {}
20 explicit bCoordMove(std::string const& coordmove);
21 explicit bCoordMove(bBasicMove const& m)
22 : bBasicMove{m}
23 {}
24 ~bCoordMove() override
25 {}
26
27 bool operator==(bCoordMove const& rhs)
28 { return bBasicMove::operator==(rhs); }
29
30private:
31 void setPromotion(const cpiece_t p);
32};
33
34#endif // defined COORDMOVE_H
35
36// eof
constexpr bool operator==(bBasicMove const &r) const
Definition basicmove.h:42
bCoordMove(bBasicMove const &m)
Definition coordmove.h:21
bCoordMove(bCoordMove const &cm)
Definition coordmove.h:17
~bCoordMove() override
Definition coordmove.h:24
bool operator==(bCoordMove const &rhs)
Definition coordmove.h:27
enum tCPiece cpiece_t
Definition piece.h:35