@ -16,3 +16,9 @@ char* getRulesMessage(){
"Mit dem Befehl \"start\" startest du das Spiel"
"Mit dem Befehl \"rules\" kannst du diese Nachricht erneut aufrufen.";
}
struct ticTacToe createTicTacToe() {
struct ticTacToe newGame;
newGame.currentState = 0;
return newGame;
@ -7,5 +7,6 @@ struct ticTacToe{
char* getWelcomeMessage();
char* getRulesMessage();
struct ticTacToe createTicTacToe();
#endif //TICTACTOE_H
@ -37,4 +37,16 @@ void test_rules_message(void){
// assert
TEST_ASSERT_EQUAL_STRING(expectedMessage, message);
void test_initial_state(void){
// arrange
int expectedState = 0;
// act
newGame = createTicTacToe();
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState );