diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-18 13:53:23 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-18 23:49:34 +0000 |
commit | a51fce6c0f86ffe711d19f641d1f14ea0289362a (patch) | |
tree | 4d4b7673ffd94427f4f60d52b6c2de7692c48a25 /Userland/Libraries/LibCards/CardStack.cpp | |
parent | 4c5e9f56338bd554d058870cab1bf5703e7a4939 (diff) | |
download | serenity-a51fce6c0f86ffe711d19f641d1f14ea0289362a.zip |
LibCards+Games: Change name of card type to card suit
Playing cards have a `suit` such as `hearts`/`diamonds`, not a
`type`. Make the internal naming consistent with the way playing cards
are typically named.
Diffstat (limited to 'Userland/Libraries/LibCards/CardStack.cpp')
-rw-r--r-- | Userland/Libraries/LibCards/CardStack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCards/CardStack.cpp b/Userland/Libraries/LibCards/CardStack.cpp index 7726f4e554..2d65d124ea 100644 --- a/Userland/Libraries/LibCards/CardStack.cpp +++ b/Userland/Libraries/LibCards/CardStack.cpp @@ -212,7 +212,7 @@ bool CardStack::is_allowed_to_push(const Card& card, size_t stack_size, Movement // Prevent player from dragging an entire stack of cards to the foundation stack if (stack_size > 1) return false; - return top_card.type() == card.type() && m_stack.size() == card.value(); + return top_card.suit() == card.suit() && m_stack.size() == card.value(); } else if (m_type == Type::Normal) { bool color_match; switch (movement_rule) { |