Replace ternary operator with if..else..
This commit is contained in:
parent
8db53c2eaf
commit
1fb60df60e
1 changed files with 6 additions and 1 deletions
|
@ -271,7 +271,12 @@ e_status play_move(s_utictactoe *p_uttt, s_move *p_move) {
|
|||
// and affect p_move
|
||||
value->last_move = create_empty_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;
|
||||
|
||||
if ( p_uttt->inception_level != 1 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue