All functions
|
add_word()
|
Copies characters of the word into the puzzle_array |
case()
|
Returns the word either without change of folded to upper case depending on
the second argument of class logical. |
collapse_word()
|
Returns the character vector collapsed into as a single character vector
element. |
expand_word()
|
Returns a list with each character from the word in seccessive list elements |
filter_out_bad_directions()
|
Returns a vector of directions that can be used
given the word size, the demensions of the puzzle, and the proposed list of
directions. |
find_words()
|
Prints out location for each word in a character vector |
form_puzzle_array()
|
Forms the empty puzzle array with `.' as the holder in each cell.
The dimensions are determined by the specifications. |
found_forward_and_backward_word_location()
|
Looks for words in text and returns found words listed forward and backward |
get_random_directions()
|
Returns a character vector of directs with n_directions elements,
where n_directions is from the specifications. All directions
are allowed by the word size and the puzzle_array dimensions. |
get_specifications()
|
Reads the puzzle description file and returns a character
vector with one specification in each element. |
get_text_string()
|
Concatenates and removes all blanks and punctuation all words in each line. |
get_trial_location()
|
Returns a two element numeric vector with the row and column specified
for a location to be tried. |
get_trial_word_list()
|
Returns a list containing the following:
trial_word_vector - character vector containing the contents of the
puzzle_array beginning at the location selected and continuing
for the length of the word and in the direction indicated.
location - 2 element integer vector containing a random location of the
first character of the word
direction - 1 element character vector containing the direction
descriptor |
get_word_order()
|
Orders words in decreasing length. Ties are in ASCII order. |
get_words()
|
get_words reads in words to be inserted in the puzzle and the specifications of the puzzle. |
make_puzzle()
|
Returns a list with the filename, the specifications, a puzzle_array, and
the word_key. |
print_key()
|
Creates puzzle text ready to print |
print_puzzle()
|
Creates puzzle text ready to print |
print_words()
|
Prints list of words to find |
try_word_fit()
|
Returns a list consisting of a logical value indicating whether or not
the proposed word fits the puzzle array, a two integer vector of the row
and column location of the first character, and a two integer vector that
determines the direction of the word's orientation.
try_word_fit() - the characters found within
the array, an row and column location in a two integer vector |