Belofte version 2.1.9
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:
17 explicit bCoordMove(std::string const& coordmove);
18 explicit bCoordMove(bBasicMove const& m)
19 : bBasicMove{m}
20 {}
21 ~bCoordMove() override
22 {}
23
24 bool operator==(bCoordMove const& rhs)
25 { return bBasicMove::operator==(rhs); }
26
27private:
28 void setPromotion(const cpiece_t p);
29};
30
31#endif // defined COORDMOVE_H
32
33// eof
constexpr bool operator==(bBasicMove const &r) const
Definition basicmove.h:42
bCoordMove(bBasicMove const &m)
Definition coordmove.h:18
~bCoordMove() override
Definition coordmove.h:21
bCoordMove(std::string const &coordmove)
Definition coordmove.cpp:10
bool operator==(bCoordMove const &rhs)
Definition coordmove.h:24
enum tCPiece cpiece_t
Definition piece.h:35