/* * Copyright (c) 2022, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Cards { class CardGame : public GUI::Frame , public Config::Listener { public: virtual ~CardGame() = default; Gfx::Color background_color() const; void set_background_color(Gfx::Color const&); NonnullRefPtrVector& stacks() { return m_stacks; } NonnullRefPtrVector const& stacks() const { return m_stacks; } CardStack& stack_at_location(int location) { return m_stacks[location]; } void add_stack(NonnullRefPtr); 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 m_stacks; }; }