library(worrrd)
Let’s start off with creating a basic wordsearch.
<- c("dog", "cat", "horse", "frog", "cow", "fox")
words <- wordsearch(words, r = 10, c = 10)
ex1 #> Found positions for 6/6 words.
plot(ex1, solution = TRUE)
Crosswords require clues
in addition to words
.
<-
dat ::tribble(
dplyr~word, ~clue,
"apple", "keeps the doctor away",
"banana", "yellow; great dipped in chocolate",
"orange", "citrus; soccer halftime snack",
"lime", "citrus; green",
"pear", "Bosc; Bartlett; D'Anjou",
"strawberry", "red sweet berry full of seeds"
)<- crossword(words = dat$word, clues = dat$clue, r = 40, c = 40)
ex1 #> Found positions for 6/6 words.
plot(ex1, solution = TRUE, clues = TRUE, legend_size = 2)