Design Patterns - FMIProjects/TheKnight GitHub Wiki

Factory

  • Used by the Map2Cell class that encapsulates the data of a 2x2 map cell.
  • Needed to dynamically create new instances of this class.

Screenshot-2024-05-20-195007.png

Singleton

  • Used by the DataPersistanceManager class that manages the save/load system.
  • Needed to be only one instance => we need to maintain data for switching game scenes also.

Screenshot-2024-05-28-134727.png