diff --git a/src/c/character.c b/src/c/character.c index 2d1d317..c994b8d 100644 --- a/src/c/character.c +++ b/src/c/character.c @@ -98,6 +98,13 @@ int getCharacterGold (Character *character){ return character->gold; } +void setCharacterName (Character *character, char *newName) { + strcpy(character->name,newName); +} + +char getCharacterName (Character *character) { + return character->name; +} void increaseStat (Character *character, int stat, int amount) { switch (stat) diff --git a/src/c/character.h b/src/c/character.h index 808c8d0..ee7973c 100644 --- a/src/c/character.h +++ b/src/c/character.h @@ -59,4 +59,9 @@ void setCharacterGold (Character *character, int newGold); int getCharacterGold (Character *character); void levelUp (Character *character); + +void setCharacterName (Character *character, char newName[]); + +char getCharacterName (Character *character); + #endif \ No newline at end of file