Find the longest word.
A popular word game has sixteen six-sided dice. Each dice is unique with a single letter of the alphabet on each face. The dice are rolled and arranged in a 4×4 grid. The players try to create valid words using the dice. Any dice can be chosen as a starting letter, but subsequent letters must adjacent horizontally, vertically or diagonally to the previous dice. The object of the game is to find a valid word with the most letters.
The six faces of the sixteen dice can be seen in the `dice.txt` file below. It is important that the grid is stored in a 2D array for each dice position to be processed easily. The program does not need to determine who wins.
Write a program that reads in the faces of the sixteen dice, picks a random face from each die and outputs the letter from the face in a 4×4 grid.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram, selection or iteration statement to explain its purpose.
Use these resources as a reference to help you meet the success criteria.
Run the program several times to check that your program has met the success criteria.
Check that you have: