verticalSelection() {

        // if either last cell or current cell are null, return null
        if (!this.lastCell || !this.currentCell) { return null; }

        // if the selection isn't vertical,
        // return null and pass to diagonal checker function
        if (this.lastCell.col != this.currentCell.col) { return null; }

        let characterArray = [];

        let delta = this.lastCell.row <= this.currentCell.row ? 1 : -1;

        for (let row = this.lastCell.row; row != this.currentCell.row + delta; row += delta) {

            let col = this.lastCell.col;
            let character = this.activeMatrix[row][col];

            characterArray.push( { "row": row, "col": col, "character": character } );

        }

        return characterArray;

    }
/*
     * Checks to see if selected cells are in vertical line
     */
Checks to see if selected cells are in vertical line
Checks to see if selected cells are in vertical line
verticalSelection() {
        if (!this.lastCell || !this.currentCell) { return null; }
        if (this.lastCell.col != this.currentCell.col) { return null; }
        let characterArray = [];
        let delta = this.lastCell.row <= this.currentCell.row ? 1 : -1;
        for (let row = this.lastCell.row; row != this.currentCell.row + delta; row += delta) {
            let col = this.lastCell.col;
            let character = this.activeMatrix[row][col];
            characterArray.push( { "row": row, "col": col, "character": character } );
        }
        return characterArray;
    }
verticalSelection ( ) { if ( ! this . lastCell || ! this . currentCell ) { return null ; } if ( this . lastCell . col != this . currentCell . col ) { return null ; } let characterArray = [ ] ; let delta = this . lastCell . row <= this . currentCell . row ? 1 : - 1 ; for ( let row = this . lastCell . row ; row != this . currentCell . row + delta ; row += delta ) { let col = this . lastCell . col ; let character = this . activeMatrix [ row ] [ col ] ; characterArray . push ( { "row" : row , "col" : col , "character" : character } ) ; } return characterArray ; }
Checks to see if selected cells are in vertical line
Checks to see if selected cells are in vertical line
// if either last cell or current cell are null, return null // if the selection isn't vertical, // return null and pass to diagonal checker function