Having problems with 2d arrays
I am making a simple text based game, basically, it is a 20x20 board and i am keeping track of the player with 2 integers (x and y). I describe the terrain at each turn using a 20x20 character array (M for mountains, W for water etc)
Now i have to add enemies to the game and keep track of what enemies are in each square using a 2d array and randomly assign monsters to each square (lots of the squares will be empty, but some may have up to 3 monsters)
I am totally confused how to do this, i was thinking of having a 2d character array to keep track of the type of enemy in each square (O for orcs etc) but they have to be random and vary in number for each square and i am unsure how to keep track of all this information...
Not sure if thats making much sense....
Thanks in advance