src/lib/wordfindgame.js
function (words, puzzleEl, wordsEl, options, colorHash) {
                wordList = words.slice(0).sort();
                var puzzle = wordfind.newPuzzle(words, options);
                // draw out all of the words
                drawPuzzle(puzzleEl, puzzle);
                var list = drawWords(wordsEl, wordList);
                $('.puzzleSquare').on("mousedown.spl touchstart.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, startTurn)
                    .on("touchmove.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, touchMove)
                    .on("mouseup.spl touchend.spl", { puzzleEl: puzzleEl, wordsEl: list, colorHash: colorHash }, endTurn)
                    .on("mousemove.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, mouseMove);
                return puzzle;
            }
function (words, puzzleEl, wordsEl, options, colorHash) {
                wordList = words.slice(0).sort();
                var puzzle = wordfind.newPuzzle(words, options);
                // draw out all of the words
                drawPuzzle(puzzleEl, puzzle);
                var list = drawWords(wordsEl, wordList);
                $('.puzzleSquare').on("mousedown.spl touchstart.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, startTurn)
                    .on("touchmove.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, touchMove)
                    .on("mouseup.spl touchend.spl", { puzzleEl: puzzleEl, wordsEl: list, colorHash: colorHash }, endTurn)
                    .on("mousemove.spl", { puzzleEl: puzzleEl, colorHash: colorHash }, mouseMove);
                return puzzle;
            }
function ( words , puzzleEl , wordsEl , options , colorHash ) { wordList = words . slice ( 0 ) . sort ( ) ; var puzzle = wordfind . newPuzzle ( words , options ) ; // draw out all of the words drawPuzzle ( puzzleEl , puzzle ) ; var list = drawWords ( wordsEl , wordList ) ; $ ( '.puzzleSquare' ) . on ( "mousedown.spl touchstart.spl" , { puzzleEl : puzzleEl , colorHash : colorHash } , startTurn ) . on ( "touchmove.spl" , { puzzleEl : puzzleEl , colorHash : colorHash } , touchMove ) . on ( "mouseup.spl touchend.spl" , { puzzleEl : puzzleEl , wordsEl : list , colorHash : colorHash } , endTurn ) . on ( "mousemove.spl" , { puzzleEl : puzzleEl , colorHash : colorHash } , mouseMove ) ; return puzzle ; }
Creates a new word find game and draws the board and words.

Returns the puzzle that was created.

@param {[String]} words: The words to add to the puzzle
@param {String} puzzleEl: Selector to use when inserting the puzzle
@param {String} wordsEl: Selector to use when inserting the word list
@param {Options} options: WordFind options to use when creating the puzzle
Creates a new word find game and draws the board and words .