Add missing test

This commit is contained in:
Yorick Barbanneau 2021-10-01 17:20:15 +02:00
parent 8074c40810
commit f319f0e53c
2 changed files with 3 additions and 1 deletions

View file

@ -115,6 +115,9 @@ e_player get_next_player_to_play(s_utictactoe *p_uttt) {
if ( p_uttt->history == NULL ) {
return PLAYER_X;
}
else if( p_uttt->history->last_move->player == PLAYER_O){
return PLAYER_X;
}
else {
return PLAYER_O;
}

View file

@ -147,7 +147,6 @@ int main(int argc, char* argv[]) {
s_utictactoe *test_uttt = create_empty_utictactoe(1);
free_utictactoe(test_uttt);
test_uttt = create_empty_utictactoe(2);
get_next_player_to_play(test_uttt);
free_utictactoe(test_uttt);
test_uttt = create_empty_utictactoe(3);
free_utictactoe(test_uttt);