move(c) {
		if (c < 0 || c >= this.cols) return null;

		if (this.outcome !== ONGOING) return null;

		for (let r = 0; r < this.rows; r++) {
			if (this.board[r][c] === EMPTY) {
				this.board[r][c] = this.whiteMoves ? WHITE : BLACK;

				this.gameLog.push({
					side: this.whiteMoves ? "White" : "Black",
					row: r,
					col: parseInt(c, 10),
				}); //add move to game log

				this.whiteMoves = !this.whiteMoves;
				this.totalMoves++;
				this.turnsRemaining--;

				this.outcome = this.getOutcome();

				return r;
			}
		}

		return null;
	}
// If move cannot be done, returns null.

If move cannot be done, returns null.
If move cannot be done returns null .
move(c) {
		if (c < 0 || c >= this.cols) return null;
		if (this.outcome !== ONGOING) return null;
		for (let r = 0; r < this.rows; r++) {
			if (this.board[r][c] === EMPTY) {
				this.board[r][c] = this.whiteMoves ? WHITE : BLACK;
				this.gameLog.push({
					side: this.whiteMoves ? "White" : "Black",
					row: r,
					col: parseInt(c, 10),
				}); 
				this.whiteMoves = !this.whiteMoves;
				this.totalMoves++;
				this.turnsRemaining--;
				this.outcome = this.getOutcome();
				return r;
			}
		}
		return null;
	}
move ( c ) { if ( c < 0 || c >= this . cols ) return null ; if ( this . outcome !== ONGOING ) return null ; for ( let r = 0 ; r < this . rows ; r ++ ) { if ( this . board [ r ] [ c ] === EMPTY ) { this . board [ r ] [ c ] = this . whiteMoves ? WHITE : BLACK ; this . gameLog . push ( { side : this . whiteMoves ? "White" : "Black" , row : r , col : parseInt ( c , 10 ) , } ) ; this . whiteMoves = ! this . whiteMoves ; this . totalMoves ++ ; this . turnsRemaining -- ; this . outcome = this . getOutcome ( ) ; return r ; } } return null ; }
If move cannot be done, returns null.
If move cannot be done returns null .
//add move to game log
