Okay, I am making a text game and it's kinda like myst, if you have a sword the wolf doesn't kill you. Else, your dead, Fred. But i want people and thing to move around. If i define a class like this:
class skeliton{
PUBLIC:
int skel_pos_X = 8;
int skel_pos_Y = 17;
int max_attack = 10;
int min_attack = 2;
}
how would i make him move at random and attack at random?
Plus, how can i make an inventory? One that allows the use or dropping of the item?
my code for item positions is this:
Code:if (player_location_X == 7 && player_location_Y == 5) { if (bread = 1) { cout << "Loaf of bread\n"; } }