fix(game): remove CardColor::WILD and update wild card handling logic

This commit is contained in:
Kieran Kihn
2025-11-17 14:38:58 +08:00
parent c3a5a3ee5f
commit 562ddb25b9
3 changed files with 41 additions and 41 deletions

View File

@@ -80,7 +80,7 @@ namespace UNO::GAME {
{
for (const auto color : AllColors) {
for (const auto type : AllTypes) {
if (color != CardColor::WILD && type != CardType::WILD && type != CardType::WILDDRAWFOUR) {
if (type != CardType::WILD && type != CardType::WILDDRAWFOUR) {
for (int i = 1 + (type == CardType::NUM0); i <= 2; i++) {
this->pushBack(color, type);
}
@@ -88,8 +88,8 @@ namespace UNO::GAME {
}
}
for (int i = 0; i < 4; i++) {
this->pushBack(CardColor::WILD, CardType::WILD);
this->pushBack(CardColor::WILD, CardType::WILDDRAWFOUR);
this->pushBack(CardColor::RED, CardType::WILD);
this->pushBack(CardColor::RED, CardType::WILDDRAWFOUR);
}
this->shuffle();
}