Bad test in set_ttt_winner()

This commit is contained in:
Yorick Barbanneau 2021-10-08 17:09:00 +02:00
parent bc3b831d42
commit dc5b803e03

View file

@ -174,7 +174,7 @@ void set_tictactoe_winner(s_tictactoe *p_ttt){
// columns
for ( int i=0; i < TICTACTOE_WIDTH; i++ ) {
if (p_ttt->content[i] != NOBODY
&&p_ttt->content[i] == p_ttt->content[i+1]
&&p_ttt->content[i] == p_ttt->content[i+3]
&& p_ttt->content[i] == p_ttt->content[i+6]) {
p_ttt->winner = p_ttt->content[i];
return;