He's right.
Here are a couple of tips:
Add two variables to the class, x and y, which will hold the current position of the player, then:
Code:
void Player::moveVert(int units)
{
char *direction = (units < 0) ? "South" : "North";
y += units;
std::cout << playerName << " Has Moved" << units << " Steps To The " << direction << endl;
}
void Player::moveHoriz()
{
char *direction = (units < 0) ? "West" : "East";
x += units;
std::cout << playerName << " Has Moved" << units << " Steps To The " << direction << endl;
}
Find out how to capture the arrow keys with _getch(); This way you can use them to control the player.
Also, in a constructor you can initialize variables en masse like this:
Code:
Player::Player(char *name = "New Player") //...default name...
:x(0), y(0), strength(10), agility(10), hitpoints(10), magic(20), gold(20)
{
playerName = new char[50];
strcpy(playerName, name);
}
Good luck on your game!