game.js
// This is just a console.table display of the board created.  It shows indeces for each row/column
This is just a console.table display of the board created.  It shows indeces for each row/column
This is just a console . table display of the board created . It shows indeces for each row / column
generateGameBoard() {	
		let gameBoard = [];
		let rowArray = [];
		let numRows = 20;
		let numColumns = 20;
		let beginningChar = 65;
		for (let r = 0; r < numRows; r++) {
			let boardRow = String.fromCharCode(beginningChar);
			let boardColumns = "";
			for (let c = 1; c <= numColumns; c++) {
				let columnsDelimited = "";
				if (c < numColumns) {
					columnsDelimited = c + ",";
				}
				else {
					columnsDelimited = c;
				}
				boardColumns += columnsDelimited; 
			}
			rowArray = (boardRow + "," + boardColumns).split(",");
			gameBoard.push(rowArray);
			beginningChar++;
		}
		for (let r = 0; r < gameBoard[r]; r++) {
			for (let c = 1; c <= gameBoard[r][c]; c++) {
				gameBoard[r][c] = parseInt(gameBoard[r][c]);
			}
		}
		return gameBoard;
	}
generateGameBoard ( ) { let gameBoard = [ ] ; let rowArray = [ ] ; let numRows = 20 ; let numColumns = 20 ; let beginningChar = 65 ; for ( let r = 0 ; r < numRows ; r ++ ) { let boardRow = String . fromCharCode ( beginningChar ) ; let boardColumns = "" ; for ( let c = 1 ; c <= numColumns ; c ++ ) { let columnsDelimited = "" ; if ( c < numColumns ) { columnsDelimited = c + "," ; } else { columnsDelimited = c ; } boardColumns += columnsDelimited ; } rowArray = ( boardRow + "," + boardColumns ) . split ( "," ) ; gameBoard . push ( rowArray ) ; beginningChar ++ ; } for ( let r = 0 ; r < gameBoard [ r ] ; r ++ ) { for ( let c = 1 ; c <= gameBoard [ r ] [ c ] ; c ++ ) { gameBoard [ r ] [ c ] = parseInt ( gameBoard [ r ] [ c ] ) ; } } return gameBoard ; }
This is just a console.table display of the board created.
This is just a console . table display of the board created .