|
@ -68,6 +68,10 @@ int main() { |
|
|
messages(player, '\0'); // Winner |
|
|
messages(player, '\0'); // Winner |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (i == 8) { |
|
|
|
|
|
messages(3, '\0'); // Tie |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
player = switchPlayer(player); |
|
|
player = switchPlayer(player); |
|
|
|
|
|
|
|
@ -202,6 +206,9 @@ void messages(int message, char player) { |
|
|
case 11: |
|
|
case 11: |
|
|
printf("\nPlayer O has won!\n\n"); |
|
|
printf("\nPlayer O has won!\n\n"); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case 3: |
|
|
|
|
|
printf("\nIt's a draw. Good game!\n\n"); |
|
|
|
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
printf("\nPlayer %c, enter your move (1-9): ", player); |
|
|
printf("\nPlayer %c, enter your move (1-9): ", player); |
|
|
break; |
|
|
break; |
|
|