For my class project I am planning on working with a math generator rpg game that includes a health and leveling system. On top of that there is an option to pick 1 player/2 player mode and allow each player to type in a string for the username. Also the option for picking how many rounds the game would go on for would be included as well. Then by the end of each game it will store the score into a text file of the most recent game. My problem is that how can I incorporate 1 dimension and 2 dimension arrays into the program (which are the requirements to the project).
- You could allow an arbitrary number of players and store them in an array.
- You could have the players' inventories be represented internally by an array of objects.
- You could have the map be stored as a two-dimensional array of rooms.