diff --git a/src/c/character.c b/src/c/character.c index 1664eea..9d3517e 100644 --- a/src/c/character.c +++ b/src/c/character.c @@ -17,3 +17,7 @@ void setCharacterStrength(Character *character, int newStrength) { character->strength = newStrength; } + +int getCharacterStrength(Character *character) { + return character->strength; +} diff --git a/src/c/character.h b/src/c/character.h index 999692c..2396bc7 100644 --- a/src/c/character.h +++ b/src/c/character.h @@ -12,6 +12,6 @@ int getCharacterHealthPoints (Character *character); void setCharacterStrength (Character *character, int newStrength); - +int getCharacterStrength(Character *character) #endif \ No newline at end of file diff --git a/test/c/test_character.c b/test/c/test_character.c index 3e26839..d4012d2 100644 --- a/test/c/test_character.c +++ b/test/c/test_character.c @@ -33,6 +33,8 @@ void test_setCharacterStrenght(void) TEST_ASSERT_EQUAL_INT(50,testCharacter.strength); } - +void test_getCharacterStrength(void) { + TEST_ASSERT_EQUAL_INT(5,testCharacter2.strength); +} #endif // TEST \ No newline at end of file