GigaPasjans
Loading...
Searching...
No Matches
CardRenderer.h
1// Wykonane przez Piotra ChudziƄskiego w dniu 14.04.2025
2#pragma once
3
4#include <random>
5#include <ranges>
6
7#include "CardComponent.h"
8#include "FoundationComponent.h"
9#include "FragmentComponent.h"
10#include "StockComponent.h"
11
12namespace Game
13{
17 class CardRenderer
18 {
19 public:
20 CardRenderer();
21
25 std::unordered_map<Card *, UniqueRef<CardComponent>> Tableau;
26
30 std::unordered_map<CardStack *, UniqueRef<FoundationComponent>> Foundation;
31
35 std::unordered_map<CardStack *, UniqueRef<FragmentComponent>> Fragments;
36
40 UniqueRef<StockComponent> Stock;
41
46
51
55 void Initialize(::Game::Deck *deck);
56
61
65 void Update();
66 };
67
68} // namespace Game
The renderer of component registry.
Definition Surface.h:28
std::unordered_map< CardStack *, UniqueRef< FragmentComponent > > Fragments
Maps card stacks to their fragment components.
Definition CardRenderer.h:35
Andromenda::Surface * Surface
Rendering surface used for drawing components.
Definition CardRenderer.h:50
Deck * Deck
Pointer to the associated card deck.
Definition CardRenderer.h:45
void RegisterComponents(Andromenda::Surface *surface)
Registers rendering components to the surface.
Definition CardRenderer.cpp:43
std::unordered_map< Card *, UniqueRef< CardComponent > > Tableau
Maps cards to their tableau visual components.
Definition CardRenderer.h:25
void Initialize(::Game::Deck *deck)
Initializes the renderer with a given deck.
Definition CardRenderer.cpp:17
std::unordered_map< CardStack *, UniqueRef< FoundationComponent > > Foundation
Maps card stacks to their foundation components.
Definition CardRenderer.h:30
void Update()
Updates the state of all visual components.
Definition CardRenderer.cpp:73
UniqueRef< StockComponent > Stock
Visual component representing the stock pile.
Definition CardRenderer.h:40
Represents a deck of cards, including all stacks.
Definition Deck.h:78