P
Poddington
Guest
Hi Everyone,
I need some advice as I'm going in circles trying to figure out how to do something.
I'm trying to make a task list.
So if I say:
Build this wall
Mine this rock
Haul this rock
The player can check the task list, see what has to be done and assign itself a task. Now there could be multiple characters in the game and the information needed to complete the task would be more than one value.
I don't have the best understanding of data structures, so I may be missing something obvious, but if I use a list, queue or stack I'm only able to have 1 value where as a map allows me to have a key and a value, though no identical keys. I also don't think an array would be sufficient as entries can be removed once completed and unless you use a shift loop to remove gaps the array will get bigger over time.
To throw another spanner in the works, I don't want to be using objects, or as few as possible.
So my question is if someone has an idea of how to approach this please?
Thanks
I need some advice as I'm going in circles trying to figure out how to do something.
I'm trying to make a task list.
So if I say:
Build this wall
Mine this rock
Haul this rock
The player can check the task list, see what has to be done and assign itself a task. Now there could be multiple characters in the game and the information needed to complete the task would be more than one value.
I don't have the best understanding of data structures, so I may be missing something obvious, but if I use a list, queue or stack I'm only able to have 1 value where as a map allows me to have a key and a value, though no identical keys. I also don't think an array would be sufficient as entries can be removed once completed and unless you use a shift loop to remove gaps the array will get bigger over time.
To throw another spanner in the works, I don't want to be using objects, or as few as possible.
So my question is if someone has an idea of how to approach this please?
Thanks