docs: function (puzzle, options, word) {
              var locations = [], height = options.height, width = options.width, wordLength = word.length, maxOverlap = 0; // we'll start looking at overlap = 0
              // loop through all of the possible orientations at this position
              for (var k = 0, len = options.orientations.length; k < len; k++) {
                  var orientation = options.orientations[k], check = checkOrientations[orientation], next = orientations[orientation], skipTo = skipOrientations[orientation], x = 0, y = 0;
                  // loop through every position on the board
                  while (y < height) {
                      // see if this orientation is even possible at this location
                      if (check(x, y, height, width, wordLength)) {
                          // determine if the word fits at the current position
                          var overlap = calcOverlap(word, puzzle, x, y, next);
                          // if the overlap was bigger than previous overlaps that we've seen
                          if (overlap >= maxOverlap || (!options.preferOverlap && overlap > -1)) {
                              maxOverlap = overlap;
                              locations.push({ x: x, y: y, orientation: orientation, overlap: overlap });
                          }
                          x++;
                          if (x >= width) {
                              x = 0;
                              y++;
                          }
                      }
                      else {
                          // if current cell is invalid, then skip to the next cell where
                          // this orientation is possible. this greatly reduces the number
                          // of checks that we have to do overall
                          var nextPossible = skipTo(x, y, wordLength);
                          x = nextPossible.x;
                          y = nextPossible.y;
                      }
                  }
              }
              // finally prune down all of the possible locations we found by
              // only using the ones with the maximum overlap that we calculated
              return options.preferOverlap ?
                  pruneLocations(locations, maxOverlap) :
                  locations;
          }