Closed HuaYuan-Tseng closed 3 months ago
Now it can return the error status code normally and would not crash.
42 Stil Segmentation fault
ArchitectureMarket::cards()
return std::map<CardName, int>
.
ArchitectureMarket::cards()
returnstd::map<CardName, int>
.
std::map<CardName, std::vector<Building*>> ArchitectureMarket::cards() const;
修改成
std::map<CardName, int> ArchitectureMarket::cards() const;
因為卡堆不必回傳 card*
。當卡片還在卡堆裡,card::operateEffect
不會被 call。
If use pointer to pass the information back to front-end, perhaps will segmentation fault when call a non-exist game_id (#41 ).
To separate the concerns of
InitGameEvent
andInitGamePresenter
, we will modify the pointer type to object type (maybestd::string
etc.) inInitGameEvent
.