Structure Service - UQdeco2800/2022-studio-1 GitHub Wiki

Introduction

The Structure Service implements the Observer design pattern and creates the following functionality described below. The Structure Service is critical to the game, as it provides a uniform way of accessing all Structure objects. Furthermore, it also provides the foundation upon which map state grid is based, which allows developers to quickly determine whether a 'tile' in the grid is occupied.

Service Design

Facilitates the:

  • Registration of structure objects
  • Return of a list of all registered entities
  • Access to grid containing game state for all objects
  • Disposal of registered structures
  • Integration with UI display elements
  • Integration with the StructureFactory to create structures