Archived

This topic is now archived and is closed to further replies.

SonShadowCat

Ways to do inventory?

Recommended Posts

at the moment i am working on a text tournament style game i was wondering how i should do my inventory should i use a linked list or array(s)? is there a better way of doing it? thx "Those who serve no purpose, have no purpose"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by SonShadowCat
at the moment i am working on a text tournament style game

i was wondering how i should do my inventory

should i use a linked list or array(s)?

is there a better way of doing it?



If you''re using C++, I''d recommend a deque (from the STL) all the really neat-o keen features of a list with all the array-style syntax you could ask for!

Share this post


Link to post
Share on other sites
Yeah.... since it''s a text game, you really don''t need to worry aout optimization, so you could use an array-based structure like a collection if you want. Then again, lists work great, and they are easy to implement with STL.

Share this post


Link to post
Share on other sites