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
*/
14
class
bCoordMove
:
public
bBasicMove
{
15
public
:
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
26
private
:
27
void
setPromotion(
const
cpiece_t
p);
28
};
29
30
#endif
// defined COORDMOVE_H
31
32
// eof
bBasicMove
move
Definition
move.h:12
bBasicMove::m_promotion
ppiece_t m_promotion
Definition
move.h:56
bBasicMove::to
MEMBER_CONSTEXPR case_t to() const
Definition
move.h:29
bBasicMove::from
MEMBER_CONSTEXPR case_t from() const
Definition
move.h:25
bCoordMove
simple coordmove, with 4 characters, or 5 characters in case of promotion mostly used for interface
Definition
coordmove.h:14
bCoordMove::~bCoordMove
~bCoordMove() override
Definition
coordmove.h:18
bCoordMove::operator==
friend bool operator==(bCoordMove const &lhs, bCoordMove const &rhs)
Definition
coordmove.h:20
cpiece_t
enum tCPiece cpiece_t
Definition
piece.h:35
src
coordmove.h
Generated on 10/10/2024 by
1.9.8