2 //! @brief implementation of the map director
4 //! The director class in the builder pattern
5 //! Directs the builders to construct a map and the treasure and monsters within it
8 #include "MapBuilder.h"
12 //! Directs the builders to construct a map and the treasure and monsters within it
16 ~MapDirector() { delete m_mapBuilder
; };
17 void setMapBuilder(MapBuilder
* mapBuilder
) { m_mapBuilder
= mapBuilder
; };
20 return m_mapBuilder
->getMap();
22 void constructMap(string fileName
)
24 m_mapBuilder
->createNewMapProduct();
25 m_mapBuilder
->buildMap(fileName
);
26 m_mapBuilder
->buildMonsters();
27 m_mapBuilder
->buildTreasure();
30 MapBuilder
* m_mapBuilder
;