Create systems for managing data
We need systems for managing and storing data. Data includes:
- Information about player's resources
- Information about ongoing and already held events
- Information about the city
For this we need to first update the UML diagram to include the following structure:
-
DataStorage
- stores all the information about player's resources and player's city. Includes the following fields:-
money
- to represent player's balance -
citizens
- represents player's city citizen count -
popularity
- represents city's popularity -
buildings
- array pf small, easy-to-save containers with data about all buildings in the city -
events
- holds the log of events already held by the player -
quests
- holds identifiers of active quests, (maybe) holds progress on these quests
-
-
EventManager
- responsible for managing the events.- Provides API to start events
- Notifies about event's progress
-
City
- holds information about the city.- References buildings directly so other entities can access them
- Can dump all placed buildings into an easy-to-save container for
DataStorage
- Provides APIs for placing buildings, checking space availability, and removing buildings.