I'm creating a dungeon crawler in C++ and I'm almost done but I need to make the monster move and I'm at the end of my wits.
This is my map:
Char Map[10][10];
and this is how I initialize the positions of the monsters:
void fieldinfo::RandomizeMonsterPositions()
{
amountEnemies=10;
srand(time(0));
for(i=0; i map[rand()%9][rand()%9] = enemy;
}
}
fieldinfo
is the name of my class.
Each time the player moves, the map is redrawn with the updated players position and I need the monster to move every time the player does (randomly or not I don't care).
No comments:
Post a Comment