Well, you could have a ChooseChar function, in which it gets the players choice, and depending on that choice sets the attributes.
like, for example:
int agility;
int strength;
ChooseChar...
Type: Posts; User: SqueakyPebble
Well, you could have a ChooseChar function, in which it gets the players choice, and depending on that choice sets the attributes.
like, for example:
int agility;
int strength;
ChooseChar...
Question:
What do all those numbers in front of the words do? I haven't seen code like that before...
Change it to:
void player::goNorth ()
{
if (location->toTheNorth != NULL)
{
location = location -> toTheNorth;
text("You are now heading North"); //or whatever you want...
You could also make an array of rooms, with the player's coordinates being one room in the array.
int a =1,b=1;
room [15] [15]; //a 15*15 array of rooms
player.location = room [a] [b];
void...
Well, this is embarrassing.
I'm assuming tolower and toupper change the case of a letter?
In that case, the first version (or the new version) would work just fine. Oops :/
you should add && t!= 'a' && t!= 'u', etc to line 13, otherwise it will count all of the lowercase vowels as consonant.
In normal english, its:
While the variable c is not equal to small a
c is the variable, defined on line 7 and initialized on line 11
!= is the not equal to operator
and putting ' around the 'a'...
Though it's hard to be absolutely certain without knowing what else in your game needs to move, I think the best course of action is to put the movement in the player class.
As for what needs to...
There is another option. If you can't find a book on game programming in C, just look for one on the C language itself.
Then you can look for game programming in general to help you with the...