Belofte version 2.1.8
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/** simple coordmove, with 4 characters, or 5 characters in case of promotion
12 * mostly used for interface
13 */
14class bCoordMove : public bBasicMove {
15public:
16 explicit bCoordMove(std::string const& coordmove);
17 explicit bCoordMove(bBasicMove const& m);
18 ~bCoordMove() override {}
19
20 friend bool operator==(bCoordMove const& lhs, bCoordMove const& rhs) {
21 return (lhs.from() == rhs.from())
22 && (lhs.to() == rhs.to())
23 && (lhs.m_promotion == rhs.m_promotion);
24 }
25
26private:
27 void setPromotion(const cpiece_t p);
28};
29
30#endif // defined COORDMOVE_H
31
32// eof
move
Definition move.h:12
ppiece_t m_promotion
Definition move.h:56
MEMBER_CONSTEXPR case_t to() const
Definition move.h:29
MEMBER_CONSTEXPR case_t from() const
Definition move.h:25
simple coordmove, with 4 characters, or 5 characters in case of promotion mostly used for interface
Definition coordmove.h:14
~bCoordMove() override
Definition coordmove.h:18
friend bool operator==(bCoordMove const &lhs, bCoordMove const &rhs)
Definition coordmove.h:20
enum tCPiece cpiece_t
Definition piece.h:35