Old Colony Crossword Puzzle
In this project I had to make a crossword puzzle. I was given a text file that contained the answers, location, and orientation of each question. Then I had to turn it into a crossword board to play and share.
I’m going to start by defining a “class” and an “object.” A class is basically a blueprint for a house. It’s where you define how it needs to be built and the functions it will perform. An object is the house. It performs the functions defined in the class.
To start off the development of this program, I had to choose how I would organize the program. I created a class called “Main” which is where this program starts. This was used to manage the user input and tell the “Crossword” class what to do. What the “Crossword” class does is hold the board and the clues. It also contains the functions that allow you to add and remove words from the board. The board is a class called “CrosswordBoard.” This class creates a filled board and an empty board that are then compared to each other. If the boards are different, the player has not yet won, else, the player has won. There is also a function that allows you to set an answer, you can input an actual answer, or to remove one you can input an empty answer.
One thing that I learned is that planning is important and without it, your projects will get messy. This was learned because I only partly planned and ended up with a ton of messy code.
One of the bugs I know about is with clues 10 and above. Since I’m using a single character to represent each space, multi-digit numbers only show the first digit of the number. We were told to use asterisks for a spot with an answer and a period for one without, but I found this hard to look at. So I decided to get a filled box character and an empty box character to represent the different spaces.
