Text based adventure game.
Hi, I'm at the beginning stage of making a text based adventure game. But after making my player.h (which has health, name, and things like goNorth which I'm not even sure if it should be there) witch is here:
Code:
#pragma once
#include <iostream>
#include <string>
using namespace std;
class player
{
public:
char* playerName;
int health;
void goNorth();
void goEast();
void goSouth();
void goWest();
void attackMonster();
void getTreasure();
}
And then I have my cpp file and I don't know what to put here
Code:
void player::goNorth()
{
//what needs to go here?
}
So I guess what I'm asking is, am I even on the right track trying to put this in my player class or is it better to have a separate movement class to deal with this? And kind of thing goes in the above scenario. And if anyone has a link to a good tutorial about creating text based games in C++?
Thanks if you can help me :biggrin: