src/Board.java
/**
   * This method checks if the game board has
   * resulted in a win and sets the gameWon
   * property accordingly.
   * 
   * @return boolean Returns true or false depending on if the game is in a won state.
   */
This method checks if the game board has
resulted in a win and sets the gameWon
property accordingly.

@return boolean Returns true or false depending on if the game is in a won state.
This method checks if the game board has resulted in a win and sets the gameWon property accordingly . @return boolean Returns true or false depending on if the game is in a won state .
public boolean didPlayerWin() {
    String letterToCheck;
    if (getPlayerTurn() == 1) {
      letterToCheck = "X";
    } else {
      letterToCheck = "O";
    }
    for (int i = 0; i < winningLines.length; i++) {
      int count = 0;
      for (int j = 0; j < getWinningLine(i).length; j++) {
        if ( getSpace(getWinningLine(i)[j]).equals(letterToCheck) ) {
          count++;
        }
      }
      if ( count == 3 ) {
        return true;
      }
    }
    return false;
  }
public boolean didPlayerWin ( ) { String letterToCheck ; if ( getPlayerTurn ( ) == 1 ) { letterToCheck = "X" ; } else { letterToCheck = "O" ; } for ( int i = 0 ; i < winningLines . length ; i ++ ) { int count = 0 ; for ( int j = 0 ; j < getWinningLine ( i ) . length ; j ++ ) { if ( getSpace ( getWinningLine ( i ) [ j ] ) . equals ( letterToCheck ) ) { count ++ ; } } if ( count == 3 ) { return true ; } } return false ; }
This method checks if the game board has
 resulted in a win and sets the gameWon
 property accordingly.
This method checks if the game board has resulted in a win and sets the gameWon property accordingly .
// Determine which letter to check for based on playerTurn // Check all possible win conditions and return true if game is won or false if not