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