Browse Source

Update: corrected errors

remotes/origin/fdai7775-main-patch-54732
fdai7775 11 months ago
parent
commit
18a2eeaa64
  1. 4
      src/main/c/GameTic_Tac_Toe/game.c

4
src/main/c/GameTic_Tac_Toe/game.c

@ -76,8 +76,8 @@ void makeMove() {
// Konvertiere die Zahl in Zeilen- und Spaltenindex // Konvertiere die Zahl in Zeilen- und Spaltenindex
if (isValidMove(choice)) { if (isValidMove(choice)) {
int row = (choice - 1) / / BOARD_SIZE;
int col = (choice - 1) % % BOARD_SIZE;
int row = (choice - 1) / BOARD_SIZE;
int col = (choice - 1) % BOARD_SIZE;
board[row][col] = currentPlayer; board[row][col] = currentPlayer;
currentPlayer = switchPlayer(currentPlayer); currentPlayer = switchPlayer(currentPlayer);

Loading…
Cancel
Save