- Joined
- Sep 14, 2011
- Messages
- 47
Hey guys:
I am hoping to get some advice about data structures and retrieval using hashtables, which I think are so much cooler than arrays.
I have a creep unit each guarding a tower, whose handle I have saved under the key of a specific tower, as such:
Hashtable - Save Handle of CreepUnit as (key guard) of (Key TowerUnit)
So now I can easily retrieve the handle of the Creep Unit using the handle of the Tower. But when the CreepUnit dies, is there any easy way to retrieve the handle of the parent tower unit (ie in reverse?). Is it possible to store the information so it would work in two ways or is arrays the only option really?
Thanks!
I am hoping to get some advice about data structures and retrieval using hashtables, which I think are so much cooler than arrays.
I have a creep unit each guarding a tower, whose handle I have saved under the key of a specific tower, as such:
Hashtable - Save Handle of CreepUnit as (key guard) of (Key TowerUnit)
So now I can easily retrieve the handle of the Creep Unit using the handle of the Tower. But when the CreepUnit dies, is there any easy way to retrieve the handle of the parent tower unit (ie in reverse?). Is it possible to store the information so it would work in two ways or is arrays the only option really?
Thanks!