Due: Thursday 4/24 10:00am

Submission name: w17_wordGrid

a17-wordgrid

(the words in the above grid are [exosphere, croakiness, hagrope, bescurvy, mantrap, carbinol, biding, vats, hol, telega])

4/24 Update

If you have completed placing words horizontally/vertically then you can try the following problems (neither are necessary for a fully working program, but are fun challenges).

  • Placing words diagonally.
  • Placing words backwards.

Word Placing!

Add the ability to place words in your wordsearch grid. In order to do this, you will need a list of words, I have uploaded a very large list of words (~370k) to thesource. You can find it here: https://github.com/nextcs-dw/thesource/tree/main/Wordsearch.

  • You will need to use Processing’s loadStrings() function, which returns an array of strings from a plain text file.
  • Your end goal is to write a method void pickWords(int n) which will place n words in your word search grid.
    • The words should be placed either horizontally or vertically, going left->right or top->down.
    • Placement in the grid should be random.
    • Words should be at least 3 characters long.
    • Keep track of the words actually placed in the grid with an added instance variable in the WordGrid class.
    • You will need extra methods, and possible instance variables and constants to help in this process. Add them as you see fit.
    • For testing, only add words to your wordgrid (leave all other cells blank).