From a3b61175802c31f29e4f705e29255e4f2afa3dfc Mon Sep 17 00:00:00 2001 From: Kieran Kihn <114803508+kierankihn@users.noreply.github.com> Date: Wed, 10 Dec 2025 22:31:43 +0800 Subject: [PATCH] feat(game): update card comparison to exclude wild cards - Adjusted `<` operator to properly handle `WILD` and `WILDDRAWFOUR` types during comparison. --- src/game/Card.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/Card.cpp b/src/game/Card.cpp index df6e4dd..e6f9916 100644 --- a/src/game/Card.cpp +++ b/src/game/Card.cpp @@ -66,7 +66,8 @@ namespace UNO::GAME { bool Card::operator<(const Card &other) const { - if (this->color_ != other.color_) { + if (this->color_ != other.color_ && this->type_ != CardType::WILD && this->type_ != CardType::WILDDRAWFOUR + && other.type_ != CardType::WILD && other.type_ != CardType::WILDDRAWFOUR) { return this->color_ < other.color_; } return this->type_ < other.type_;