Overview
For the APCSP Trimester 1 Final, Team Lyntax has created a program that simulates a game of hangman. Hangman is a game between two or more players. One player known as the executioner thinks up a word and at least one other person needs to guess what that word might be going one letter at a time. If the guesser(s) guesses a letter that is not in the phase, the executioner draws a body part of a stick figure onto a gallow. If the executioner draws all the body parts, the guessers lose and the game is over. If the guessers complete the word before all six body parts are drawn, they win. The Purpose of this program is to teach and/or test the user’s vocabulary skills and knowledge. This is done through hangman by displaying a definition of the unknown word. The Project will have an impact on the coders and the users. It will impact the coders because it will provide them with knowledge and experience about code. It will impact the users because it should be able to enhance their vocabulary on words used in code.
Process for creating Hangman
We first started out our code by building our own API that would store words often used in coding along with their definition. Next, we builded a framework of what the user would see as they play the game. After those two steps, the group got a good idea on what the project will end up like, so backend development began. Once backend was completed, its code was transferred to Frontend where more code was added to better perform for a user. Finally, we added some changes that would make the project better and then it was done.
How does the project work
The first lines of code that are activated are lines of code that sets up the page’s design and some of its functions. The page’s design as in images and their functions as while as spaces that will change based on the user. Spaces for correct letters, incorrect letters, the guessed letter, and for the unknown word. Functions include giving buttons outputs and setting variables. The next lines of code are lines that tell the program to get information from another source. That source is the API with the words and definitions. It takes a random word and definition and uses it to set the variables that were stated earlier. Lastly, many if statements are present that update the game’s state based on the user’s performance.