From 66a18c4a735158bf27c3f88eb79840ea13717f90 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Sun, 18 Dec 2022 21:01:59 +0100 Subject: [PATCH] [Move] Implement << operator --- Move.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Move.cpp b/Move.cpp index 75dec86..74b05c8 100644 --- a/Move.cpp +++ b/Move.cpp @@ -39,7 +39,10 @@ std::optional Move::promotion() const { } std::ostream &operator<<(std::ostream &os, const Move &move) { - (void) move; + os << move.from() << move.to(); + if (move.promotion().has_value()) { + os << static_cast(move.promotion().value()); + } return os; }