Skip to content

theimpossibleastronaut/aawordsearch

Repository files navigation

aawordsearch

Generates a wordsearch puzzle (and its corresponding answer key) with words randomly fetched from https://random-word-api.herokuapp.com/word, which uses random-word-api.

This app can be run online at https://hephaestus.dreamhosters.com/

codeql-badge c-cpp-badge

Build

You can use meson:

meson builddir
cd builddir
ninja

or your regular compiler:

gcc/clang -Wall aawordsearch.c -o aawordsearch

(If you want https support, append -lcurl -DHAVE_CURL)

Run

To run the program:

./aawordsearch

Command line options

-h (help)
--log (enable logging)

--lang=LANG     language (optional; defaults to 'en')
                available: 'en','de','it','es'

Using words from a file

Instead of fetching words from a server, you can use --input-file=FILE (where 'FILE' is a plain text file) to tell aawordsearch where to get the words from. Ex:

sidearm
reinforcing
gruff
hypocalcemias
virulent
byword
collaborated
captivating
shylocking
rocks
micronizes
nonnucleated
gainst
dependants
presbyopics
androgyne
sycophantly
hamsters
buttons
toxaemic

Test

If using meson, you can optionally run the tests (usually they are only required if you're working on a patch for aawordsearch and want to check your code changes):

meson test
meson test --setup=valgrind

Example Output

 ==] Answer key [==
- - - - - - - - - - - - - - - - - - - -
- - - - - S T R I G O S E - - - - - - -
A Z O T E M I C - - D E T P A D A O C -
- - - - - - - - - M A R C H E R - T - I
- - - S A N N A D N A B - - - - I - N -
- - - D E G N E V A N U - - - B - T - M
- - - - E N J O I N E R S - I - R - I -
- - A - - - - - - - - - - O - A - S - -
- H - N - D - - - - - - F - D - P - E -
- P - - T - E - - - - I - E - A - N - -
- O - - - I - P - B B - R - R - C - - -
- R - - - G M - R U E M - S - I - - - D
W T - - - N - O L E A A E - P - - - - E
O O - - - I - A N L D G D H - - - - - G
R X - - - N E - L I R A E R - - - - - A
T U - - - R F Y - E A R T - O - - - - N
H A - - - I - O M - E L - O - L - - - U
Y - - - - G - B R R - - - - R - L - - -
- - - - - - U - S M - - - - - Y - S - -
- - - - - S - - - - - - - - - - - - - -



O N Y X Y O L P M I R F V N E Q P Q P X
T O E D B S T R I G O S E E I S Q C F G
A Z O T E M I C R F D E T P A D A O C D
P T Q H I A Y N V M A R C H E R L T U I
N A K S A N N A D N A B D Y D T I E N I
W K S D E G N E V A N U P C X B W T I M
O B N E E N J O I N E R S X I E R N I F
E L A U C W O P Z A U Z G O O A D S Q K
P H J N B D R G X B U B F Q D A P Y E U
N P F B T Y E B D X Q I U E W A S N P V
Y O D A P I P P R B B A R T R K C G S L
C R T D D G M T R U E M Y S Q I A B R D
W T C G O N U O L E A A E A P K M R H E
O O N U J I E A N L D G D H M A E F K G
R X M X X N E O L I R A E R T A R O A A
T U K P D R F Y B E A R T T O J P N M N
H A B B D I I O M Q E L A O R L U O T U
Y A T D M G S B R R C D L E R U L A H E
R K F K W W U Z S M I X A N H Y R S N Y
N B T O W S Y C P A F A H C C O G T Y O

            marcher               form        depredatory
          enjoiners           submerge        encipherers
      intradermally         antimonial          unavenged
           strigose          auxotroph           azotemic
             unaged          coadapted            girning
          beadrolls           misparse          bandannas
       tibiofibulae             worthy