validateSelection() {

        let word = this.selectedWord();

        // exits if no word
        if (!word) { return; }

        // exits if
        if (this.foundWord(word)) { return; }

        // records word as found if word was found
        if (this.activeWords.includes(word)) { this.addFound(word, this.currentSelection); }

        // If the game is over
        if (this.wordsFound.length === this.activeWords.length) {
            // stop timer
            this.over = true;
            // record score
            accessHighscores.updateHighscores(this.calculateHighscore(Math.round(new Date().getTime() / 1000) - this.startedTime), prompt("You Win! Please enter username:"), "word_search");
            this.reset();
        }

    }
/*
     * Name: validateSelection
     * Description: On mouse release, checks if previously highlighted characters form a word
     * If word is formed, checks if word is a part of the word list
     * If user found word in list, will record word found and mark as found
     * Return: None
    */
validateSelection
Description: On mouse release, checks if previously highlighted characters form a word
If word is formed, checks if word is a part of the word list
If user found word in list, will record word found and mark as found
Return: None
validateSelection Description : On mouse release checks if previously highlighted characters form a word If word is formed checks if word is a part of the word list If user found word in list will record word found and mark as found Return : None
validateSelection() {
        let word = this.selectedWord();
        if (!word) { return; }
        if (this.foundWord(word)) { return; }
        if (this.activeWords.includes(word)) { this.addFound(word, this.currentSelection); }
        if (this.wordsFound.length === this.activeWords.length) {
            this.over = true;
            accessHighscores.updateHighscores(this.calculateHighscore(Math.round(new Date().getTime() / 1000) - this.startedTime), prompt("You Win! Please enter username:"), "word_search");
            this.reset();
        }
    }
validateSelection ( ) { let word = this . selectedWord ( ) ; if ( ! word ) { return ; } if ( this . foundWord ( word ) ) { return ; } if ( this . activeWords . includes ( word ) ) { this . addFound ( word , this . currentSelection ) ; } if ( this . wordsFound . length === this . activeWords . length ) { this . over = true ; accessHighscores . updateHighscores ( this . calculateHighscore ( Math . round ( new Date ( ) . getTime ( ) / 1000 ) - this . startedTime ) , prompt ( "You Win! Please enter username:" ) , "word_search" ) ; this . reset ( ) ; } }
Name: validateSelection
 Description: On mouse release, checks if previously highlighted characters form a word
 If word is formed, checks if word is a part of the word list
 If user found word in list, will record word found and mark as found
 Return: None
Name : validateSelection Description : On mouse release checks if previously highlighted characters form a word If word is formed checks if word is a part of the word list If user found word in list will record word found and mark as found Return : None
// exits if no word // exits if // records word as found if word was found // If the game is over // stop timer // record score