Create an applet that mimics the game Boggle.
How Boggle Works:
There are 16 dice with letters on each side of each die. The dice are shaken and then fall into 16 slots in 4 rows and 4 columns on the game board. The players then have 3 minutes to write down as many words of 3 or more letters as they can. The words must have the letters adjacent to each other either horizontally, vertically or diagonally. No letter cube can be used more than once in a single word. Proper names and abbreviations are not permitted. The players should agree upon a standard dictionary and accept doubtful words only if they are in that dictionary. At the end of 3 minutes the players compare their words. Any words that any other player has also made receive no points. Unique words receive 1 point for 3- or 4-letter words, 2 points for 5-letter words, 3 points for 6-letter words, 5 points for 7-letter words and 11 points for words of 8 or more letters. Play continues until a player has reached 50 points or more. That player wins.
The Boggle dice are given below. You will create these dice with a two-dimensional array of Strings. The first dimension will hold the number of the die and the second will hold the number of the letter on that die
So Dice[ 0 ] [ 2 ] = F means the letter on the first die and the third side of that die is F.
It is important to follow instructions EXACTLY to the specifications of this project.
DIE0: R, I, F, O, B, X
DIE1: I, F, E, H, E, Y
DIE2: D, E, N, O, W, S
DIE3: U, T, O, K, N, D
DIE4: H, M, S, R, A, O
DIE5: L, U, P, E, T, S
DIE6: A, C, I, T, O, A
DIE7: Y, L, G, K, U, E
DIE8: Qu, B, M, J, O, A
DIE9: E, H, I, S, P, N
DIE10: V, E, T, I, G, N
DIE11: B, A, L, I, Y, T
DIE12: E, Z, A, V, N, D
DIE13: R, A, L, E, S, C
DIE14: U, W, I, L, R, G
DIE15: P, A, C, E, M, D
Then create a one-dimensional array to hold the value that will be assigned to each die. This will also be a String array. Assign values to this array using a loop. For each die, 0 - 15, assign a random number, 0 - 5, to its second
dimension. This selects one face of the die. So for example the first die might have the random number 4. That means Dice[ 0 ] [ 4 ] which is B will be assigned to the one-dimensional array’s 0 position. After the loop is finished
all the values in the one-dimensional array will have been randomly selected. All of this should be done in the init method.
In the paint method, you will need to first put the name Boggle and brief directions at the top. Then you will need to draw the 4-by-4 board and display the values that you have randomly assigned to the 16 positions. Make sure
to set a readable font and have everything centered and aligned nicely.
This is what is required for this project, but it doesn’t really mimic the game accurately.
5 freelancers are bidding on average $36 for this job
This seems like a fun and easy project. I will have no difficulty with it. Don't you want a way to check if a word is legal too? That would be very easy to add.