So I have a project. It's a game where the user is going through the pyramids and needs to retrieve all of the canteens before he runs out of time and dies from dehydration.
I have the game all set up and have a few things left to do. I need to create a linked list to keep track of the canteens. In addition, if the player has any canteens, he needs to be given the option of dropping the item. If he so chooses to drop the item, the item needs to be dropped in the space he is in the grid [ie.. 3,1]. If he goes back to (3,1), the item should be there, and he should be given the option of picking it up.
So I need help with three things:
1. Creating a linked list to hold the canteens
2. Dropping the canteen in a certain grid space
3. Obtaining the canteen at the same grid space
Any ideas would be greatly appreciated.. I've written the linked list and Node functions, but I don't know how to incorporate it into the game.
Personally I would recommend going with an array of some kind for the grid. (as I have made a couple of tile based games.) You can even go with an array of characters, and simply set the character to a particular value when a canteen is there. As for the linked list, there is a list class which should do everything you want.