From dc3031ddc12fa68051ad38f27d3df8a869efe52b Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Mon, 3 Feb 2025 01:05:37 +0100 Subject: [PATCH] we can finally print pieces and colours properly --- cpp/src/pieces/piece.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/src/pieces/piece.hpp b/cpp/src/pieces/piece.hpp index a89568e..ad61c4d 100644 --- a/cpp/src/pieces/piece.hpp +++ b/cpp/src/pieces/piece.hpp @@ -4,6 +4,7 @@ #include #include +#include #include enum Piece : int8_t { @@ -21,6 +22,11 @@ enum Colour : int8_t { Black = 16, }; +inline std::ostream& operator<<(std::ostream& os, const int8_t& i) { + os << std::to_string(i); + return os; +} + class Board; struct Coords;