Question: I am having difficulties trying to add a decorator pattern to an already existing game to create a holiday them. I have most of the
I am having difficulties trying to add a decorator pattern to an already existing game to create a holiday them. I have most of the code, but Im not sure how to get the output to reflect the holiday theme
#include "HolidayDecorator.h
#include
#include
#include
class ChristmasDecorator : public HolidayDecorator
class HolidayDecorator
public:
ChristmasDecoratorstd::uniqueptr decoratedObject;
void addHolidayEffectSDLRenderer renderer override;
private:
std::uniqueptr decoratedObject;
static const int screenWidth ;
static const int screenHeight ;
static const int maxSnowflakes ;
std::vector snowflakes;
void drawSnowSDLRenderer renderer;
void drawLightsSDLRenderer renderer;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
