mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:17:34 +00:00
LibCards+Games: Make CardGame responsible for managing CardStacks
Just moving some code around really.
This commit is contained in:
parent
46299f3853
commit
6ef0504a42
6 changed files with 75 additions and 73 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibCards/CardStack.h>
|
||||
#include <LibConfig/Listener.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
|
@ -20,11 +21,20 @@ public:
|
|||
Gfx::Color background_color() const;
|
||||
void set_background_color(Gfx::Color const&);
|
||||
|
||||
NonnullRefPtrVector<CardStack>& stacks() { return m_stacks; }
|
||||
NonnullRefPtrVector<CardStack> const& stacks() const { return m_stacks; }
|
||||
CardStack& stack_at_location(int location) { return m_stacks[location]; }
|
||||
void add_stack(NonnullRefPtr<CardStack>);
|
||||
|
||||
void dump_layout() const;
|
||||
|
||||
protected:
|
||||
CardGame();
|
||||
|
||||
private:
|
||||
virtual void config_string_did_change(String const& domain, String const& group, String const& key, String const& value) override;
|
||||
|
||||
NonnullRefPtrVector<CardStack> m_stacks;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue