Replace ternary operator with if..else..

This commit is contained in:
Yorick Barbanneau 2021-10-15 16:47:06 +02:00
parent 8db53c2eaf
commit 1fb60df60e

View file

@ -271,7 +271,12 @@ e_status play_move(s_utictactoe *p_uttt, s_move *p_move) {
// and affect p_move // and affect p_move
value->last_move = create_empty_move(); value->last_move = create_empty_move();
value->last_move = p_move; value->last_move = p_move;
value->next = ( p_uttt->history == NULL ) ? NULL : p_uttt->history; if ( p_uttt->history == NULL ) {
value->next = NULL;
}
else {
value->next = p_uttt->history;
}
p_uttt->history = value; p_uttt->history = value;
if ( p_uttt->inception_level != 1 ) { if ( p_uttt->inception_level != 1 ) {