@ -886,6 +886,18 @@ int play() {
counter += 1;
}
printField(field);
printf("%d", winner);
printWinner(winner);
return winner;
void printWinner(int winner){
if(winner == PLAYER){
printf("You won\n");
else if(winner == COMPUTER){
printf("I won\n");
else if(winner == DRAW){
printf("It's a draw\n");
@ -18,5 +18,6 @@ int wasGameWon(char field[3][3]);
void getComputerInput(char field[3][3]);
void fillAlmostFull(char field[3][3], bool *pt);
int play();
void printWinner(int winner);
#endif