horizontalSelection() {

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

        // if selection isn't horizontal, exit and go to next checker function
        if (this.lastCell.row != this.currentCell.row) { return null; }

        let characterArray = [];

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

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

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

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

        }

        return characterArray;

    }
/*
     * Checks to see if selected cells are in horizontal line
     * returns array of currently selected horizontal characters
     */
Checks to see if selected cells are in horizontal line
returns array of currently selected horizontal characters
Checks to see if selected cells are in horizontal line returns array of currently selected horizontal characters
horizontalSelection() {
        if (!this.lastCell || !this.currentCell) { return null; }
        if (this.lastCell.row != this.currentCell.row) { return null; }
        let characterArray = [];
        let delta = this.lastCell.col <= this.currentCell.col ? 1 : -1;
        for (let col = this.lastCell.col; col != this.currentCell.col + delta; col += delta) {
            let row = this.lastCell.row;
            let character = this.activeMatrix[row][col];
            characterArray.push( { "row": row, "col": col, "character": character } );
        }
        return characterArray;
    }
horizontalSelection ( ) { if ( ! this . lastCell || ! this . currentCell ) { return null ; } if ( this . lastCell . row != this . currentCell . row ) { return null ; } let characterArray = [ ] ; let delta = this . lastCell . col <= this . currentCell . col ? 1 : - 1 ; for ( let col = this . lastCell . col ; col != this . currentCell . col + delta ; col += delta ) { let row = this . lastCell . row ; let character = this . activeMatrix [ row ] [ col ] ; characterArray . push ( { "row" : row , "col" : col , "character" : character } ) ; } return characterArray ; }
Checks to see if selected cells are in horizontal line
 returns array of currently selected horizontal characters
Checks to see if selected cells are in horizontal line returns array of currently selected horizontal characters
// if either last cell or current cell are null, return null // if selection isn't horizontal, exit and go to next checker function