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

4 stars 1 forks source link

[Domain] Store unique_ptr<Building> and unique_ptr<Landmark> instead of unique_ptr<Card> #29

Closed YingChen-Lee closed 7 months ago

YingChen-Lee commented 7 months ago

In Hand, we stores uniqueptr for buildings and landmarks_. However, since our logic to handle them are different, we actually don't need to store them as pointers to Card. We can store them as pointers to Landmark and Building. In this way, we can prevent from dynamic cast.