Finally, the inclusion of the pre test and post test questions have finally been completed. It took something but I was able to include this feature in no time. As previously noted on my blog, the designs of the feature were taken care of on Tuesday. Surprisingly to by knowledge, the first part was somehow the most difficult. I thought the design of the pre test and post test was easy, but it turned how to be the hardest.
Previously, I placed the answers in a two-dimensional array. When it comes to placing these questions in a drop box panel, it got complicated real quick. The drop box takes in a list of strings or images using an abstract data type “List.” Unfortunately, I used a two-dimensional string array, therefore, it couldn’t place the items in the array to the drop box. I was able to work my way around this dilemma. Since there is a class that has each question and answer, I created a method that returns a list of answers. I then placed this list in the drop box.
To check if the player choice of answers is correct, I copied all the player answers after submitting the test and placed them in a list. Once I have those answers, I compare them to the correct answers. After the comparison is done I copy the question and results (0 for wrong, 1 correct) in a text file.
The pre-test shows up only once: the first time the player starts the game. Once the player completes the pre-test, it is programmed not to show up again unless the player changes account.
I used the same classes for the post test. This time around, I reverse the order of the question.
Now that this feature has been implemented in the game, my next project is to work on updating the videos for the game. The previous, had a very low quality knowing I used an android device for recording. This time a round, I decide on using a PC for video recording.