Game-as-a-Service / Machi-Koro-Cpp

4 stars 1 forks source link

[Repository] Use Database to implement repository interface #17

Open YingChen-Lee opened 1 year ago

YingChen-Lee commented 1 year ago

For now, we use in memory repository. However, we will need to use database as repository.

We need to add new implementation of repository interface. Also, modify the parameter of GameRepository::SaveGame and GameRepository::AddGame to take raw pointer instead of shared_ptr.

angtsusiong commented 9 months ago

The map games_ should use shared pointers. It stores the object that is currently in use and is responsible for updates to the database. The memory of the game object should be destroyed, if currently we don't need to manipulate the data.