1#ifndef CONCRETEFACTORY_H
2#define CONCRETEFACTORY_H
4#include <unordered_map>
27 explicit ConcreteFactory(std::unordered_map<
Layer, std::vector<std::shared_ptr<EntityView>>>& views);
42 std::shared_ptr<logic::PacmanModel>
createPacMan(
float x,
float y,
float mapWidth,
float mapHeight)
override;
58 std::shared_ptr<logic::ChasingGhost>
createBlinky(
float x,
float y,
float mapWidth,
float mapHeight)
override;
74 std::shared_ptr<logic::AmbushGhost>
createPinky(
float x,
float y,
float mapWidth,
float mapHeight)
override;
89 std::shared_ptr<logic::AmbushGhost>
createInky(
float x,
float y,
float mapWidth,
float mapHeight)
override;
105 std::shared_ptr<logic::RandomGhost>
createClyde(
float x,
float y,
float mapWidth,
float mapHeight)
override;
120 std::shared_ptr<logic::WallModel>
createWall(
float x,
float y,
char type)
override;
133 std::shared_ptr<logic::CoinModel>
createCoin(
float x,
float y)
override;
146 std::shared_ptr<logic::FruitModel>
createFruit(
float x,
float y)
override;
149 std::unordered_map<Layer, std::vector<std::shared_ptr<EntityView>>>& entityViews;
Layer
Definition ConcreteFactory.h:17
@ PACMAN
Definition ConcreteFactory.h:17
@ FOREGROUND
Definition ConcreteFactory.h:17
@ BACKGROUND
Definition ConcreteFactory.h:17
std::shared_ptr< logic::AmbushGhost > createPinky(float x, float y, float mapWidth, float mapHeight) override
Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews).
Definition ConcreteFactory.cpp:32
std::shared_ptr< logic::RandomGhost > createClyde(float x, float y, float mapWidth, float mapHeight) override
Creates a RandomGhost and a normal GhostView (no distinction is made between GhostViews).
Definition ConcreteFactory.cpp:52
std::shared_ptr< logic::FruitModel > createFruit(float x, float y) override
Creates FruitModel and View.
Definition ConcreteFactory.cpp:82
std::shared_ptr< logic::ChasingGhost > createBlinky(float x, float y, float mapWidth, float mapHeight) override
Creates a ChasingGhost and a normal GhostView (no distinction is made between GhostViews).
Definition ConcreteFactory.cpp:22
ConcreteFactory(std::unordered_map< Layer, std::vector< std::shared_ptr< EntityView > > > &views)
Creates a ConreteFactory that can be passed to the World. Requires a views container from LevelState ...
Definition ConcreteFactory.cpp:9
std::shared_ptr< logic::CoinModel > createCoin(float x, float y) override
Creates CoinModel and View.
Definition ConcreteFactory.cpp:72
std::shared_ptr< logic::WallModel > createWall(float x, float y, char type) override
Creates WallModel and View.
Definition ConcreteFactory.cpp:62
std::shared_ptr< logic::AmbushGhost > createInky(float x, float y, float mapWidth, float mapHeight) override
Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews).
Definition ConcreteFactory.cpp:42
std::shared_ptr< logic::PacmanModel > createPacMan(float x, float y, float mapWidth, float mapHeight) override
Creates a PacmanModel and View.
Definition ConcreteFactory.cpp:12
Interface for creating game entities.
Definition AbstractFactory.h:21