|
@ -48,7 +48,7 @@ int main() { |
|
|
} |
|
|
} |
|
|
drawBoard(pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, pos9); |
|
|
drawBoard(pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, pos9); |
|
|
|
|
|
|
|
|
player = (player == 10) ? 11 : 10; |
|
|
|
|
|
|
|
|
player = switchPlayer(player); |
|
|
} |
|
|
} |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
@ -137,3 +137,11 @@ void drawBoard(int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int p |
|
|
printf("%c\n", vertical); |
|
|
printf("%c\n", vertical); |
|
|
printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); |
|
|
printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int switchPlayer(int player) { |
|
|
|
|
|
if (player == 10) { |
|
|
|
|
|
return 11; |
|
|
|
|
|
} else { |
|
|
|
|
|
return 10; |
|
|
|
|
|
} |
|
|
|
|
|
} |