New answers tagged maps
Store road attributes in separate structs and have pointers to them from your DCEL edges. It doesn't matter if some edges point to the same location in memory—the attribute data has still been allocated only once.
You could have an array of coordinates of collected coins, and then iterate over that and restore them when the level should be restarted. In general, for this problem you will want to keep the information around that you will still need later. You can do this either by remembering specific things explicitly or by cloning the original data.
Top 50 recent answers are included