42 lines
841 B
C++
42 lines
841 B
C++
#include "Move.hpp"
|
|
|
|
#include <ostream>
|
|
|
|
Move::Move(const Square &from, const Square &to, const std::optional<PieceType> &promotion)
|
|
: mFrom(from), mTo(to), mPromotion(promotion) {
|
|
}
|
|
|
|
Move::Optional Move::fromUci(const std::string &uci) {
|
|
(void) uci;
|
|
return std::nullopt;
|
|
}
|
|
|
|
Square Move::from() const {
|
|
return mFrom;
|
|
}
|
|
|
|
Square Move::to() const {
|
|
return mTo;
|
|
}
|
|
|
|
std::optional<PieceType> Move::promotion() const {
|
|
return mPromotion;
|
|
}
|
|
|
|
std::ostream &operator<<(std::ostream &os, const Move &move) {
|
|
(void) move;
|
|
return os;
|
|
}
|
|
|
|
bool operator<(const Move &lhs, const Move &rhs) {
|
|
(void) lhs;
|
|
(void) rhs;
|
|
return false;
|
|
}
|
|
|
|
bool operator==(const Move &lhs, const Move &rhs) {
|
|
return lhs.from() == rhs.from()
|
|
&& lhs.to() == rhs.to()
|
|
&& lhs.promotion() == rhs.promotion();
|
|
}
|