clone() {
		var newGame = new Board(this.rows, this.cols, this.winSequence);

		newGame.whiteMoves = this.whiteMoves;
		newGame.totalMoves = this.totalMoves;
		newGame.turnsRemaining = this.turnsRemaining;
		newGame.gameLog = this.gameLog.slice();
		newGame.outcome = this.outcome;

		//clone the board itself
		newGame.board = new Array(this.rows);
		for (let r = 0; r < this.rows; r++) {
			newGame.board[r] = new Array(this.cols);
			for (let c = 0; c < this.cols; c++) newGame.board[r][c] = this.board[r][c];
		}

		return newGame;
	}
/**
	 * Returns a new board with an identical context.
	 */
Returns a new board with an identical context.
Returns a new board with an identical context .
clone() {
		var newGame = new Board(this.rows, this.cols, this.winSequence);
		newGame.whiteMoves = this.whiteMoves;
		newGame.totalMoves = this.totalMoves;
		newGame.turnsRemaining = this.turnsRemaining;
		newGame.gameLog = this.gameLog.slice();
		newGame.outcome = this.outcome;
		newGame.board = new Array(this.rows);
		for (let r = 0; r < this.rows; r++) {
			newGame.board[r] = new Array(this.cols);
			for (let c = 0; c < this.cols; c++) newGame.board[r][c] = this.board[r][c];
		}
		return newGame;
	}
clone ( ) { var newGame = new Board ( this . rows , this . cols , this . winSequence ) ; newGame . whiteMoves = this . whiteMoves ; newGame . totalMoves = this . totalMoves ; newGame . turnsRemaining = this . turnsRemaining ; newGame . gameLog = this . gameLog . slice ( ) ; newGame . outcome = this . outcome ; newGame . board = new Array ( this . rows ) ; for ( let r = 0 ; r < this . rows ; r ++ ) { newGame . board [ r ] = new Array ( this . cols ) ; for ( let c = 0 ; c < this . cols ; c ++ ) newGame . board [ r ] [ c ] = this . board [ r ] [ c ] ; } return newGame ; }
Returns a new board with an identical context.
Returns a new board with an identical context .
//clone the board itself
