Wednesday, August 17, 2011

Array based inventory in Java?

How would I create an array based inventory in Java? I've heard that they use arrays for inventories in RPG's and other games. I'm creating a command line game using Java, and I need an array (or multiple arrays) that holds information such as weapon stats, street price, Level required to wield, and so on. I also need it so that a player can enter the command *pickup sword(egs), *wield sword, *stab, *slash... etc... What is the algorithm I would use for this?

No comments:

Post a Comment