0
Two dimensional array crossword puzzle
help me
3 odpowiedzi
0
Start by writing it in pseudocode as generally as makes sense.
E.g. I want to make a crossword puzzle with a two-d array
Next think about what components you need fo make the program work.
E.g i need a populated 2d array, a method to give questions for a given row/column, a method to check if a given answer is correct or a method to store a given answer and return if there is a collision, etc.
Then write each of those sections in pseudocode and/or write it in java.
You might consider using a different data structure, although i have no good ideas for you there. If you want to stick with a 2d array I wouldn initialize it to be the size of the entire "board", then enter characters at the necessary indexes to form the words of your answer array. The squares that would be black in a normal crossword would be left filled with the default value ('u0000' for char). Note that traditionally there is no implied relationship between two indexes in two subarrays that may happen to hold a single word (eg array[3][3] and array[4][3]). This sounds like a time consuming project as we havent even begun to write the clues yet. Good luck!
0
رحيم
0
الزركاني