Bad test in set_ttt_winner()
This commit is contained in:
parent
bc3b831d42
commit
dc5b803e03
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ void set_tictactoe_winner(s_tictactoe *p_ttt){
|
||||||
// columns
|
// columns
|
||||||
for ( int i=0; i < TICTACTOE_WIDTH; i++ ) {
|
for ( int i=0; i < TICTACTOE_WIDTH; i++ ) {
|
||||||
if (p_ttt->content[i] != NOBODY
|
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->content[i] == p_ttt->content[i+6]) {
|
||||||
p_ttt->winner = p_ttt->content[i];
|
p_ttt->winner = p_ttt->content[i];
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue