Test for get_next_player_to_play()
This commit is contained in:
parent
dd3ed1fce2
commit
8074c40810
2 changed files with 3 additions and 2 deletions
|
@ -112,7 +112,7 @@ e_player get_next_player_to_play(s_utictactoe *p_uttt) {
|
||||||
return NOBODY;
|
return NOBODY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( p_uttt->history->last_move == NULL ) {
|
if ( p_uttt->history == NULL ) {
|
||||||
return PLAYER_X;
|
return PLAYER_X;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -147,6 +147,7 @@ int main(int argc, char* argv[]) {
|
||||||
s_utictactoe *test_uttt = create_empty_utictactoe(1);
|
s_utictactoe *test_uttt = create_empty_utictactoe(1);
|
||||||
free_utictactoe(test_uttt);
|
free_utictactoe(test_uttt);
|
||||||
test_uttt = create_empty_utictactoe(2);
|
test_uttt = create_empty_utictactoe(2);
|
||||||
|
get_next_player_to_play(test_uttt);
|
||||||
free_utictactoe(test_uttt);
|
free_utictactoe(test_uttt);
|
||||||
test_uttt = create_empty_utictactoe(3);
|
test_uttt = create_empty_utictactoe(3);
|
||||||
free_utictactoe(test_uttt);
|
free_utictactoe(test_uttt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue