1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:27:35 +00:00

LibCards+Games: Remove concept of a CardStack being focused

This was only used for asking the stack if it is the one we are moving
cards from. We now have a better way to do that, by comparing against
`CardGame::moving_cards_source_stack()`, which doesn't require manually
telling a stack that it is/isn't focused.
This commit is contained in:
Sam Atkins 2022-09-28 17:47:19 +01:00 committed by Sam Atkins
parent ef8b1e25aa
commit 5186e617bd
3 changed files with 2 additions and 10 deletions

View file

@ -34,7 +34,6 @@ public:
CardStack(Gfx::IntPoint const& position, Type type, RefPtr<CardStack> covered_stack = nullptr);
bool is_empty() const { return m_stack.is_empty(); }
bool is_focused() const { return m_focused; }
Type type() const { return m_type; }
NonnullRefPtrVector<Card> const& stack() const { return m_stack; }
size_t count() const { return m_stack.size(); }
@ -42,7 +41,6 @@ public:
Card& peek() { return m_stack.last(); }
Gfx::IntRect const& bounding_box() const { return m_bounding_box; }
void set_focused(bool focused) { m_focused = focused; }
bool make_top_card_visible(); // Returns true if the card was flipped.
void push(NonnullRefPtr<Card> card);
@ -93,7 +91,6 @@ private:
Gfx::IntRect m_bounding_box;
Type m_type { Type::Invalid };
StackRules m_rules;
bool m_focused { false };
Gfx::IntRect m_base;
};