Hi there, I've been trying to place an array into another within a 2D array. I can get one array to work fine but when I try to place another the program crashes. For example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
for (int i = randRoomSize; i <= randRoomSize; i++)
{
for (int j = randRoomSize; j <= randRoomSize; j++)
{
m_DungeonArray[i][j] = i*j;
}
}
for (int x = randRoomNo; x <= randRoomNo; x++)
{
for (int y = randRoomNo; y <= randRoomNo; y++)
{
m_DungeonArray[x][y] = x*y;
}
}
Can someone help me on my way with the best method to go about this? Currently my program displays the 2d array in DirectX but all I have managed is filling the grid with wall blocks and the placement of one room. Would be good to get the random rooms scattered about the array. Can anyone help me?