Uploaded by Milan

Guess the Word.docx

advertisement
Guess the Word Game
OBJECTIVE:
Program a game of ‘Guess the Word’: one player enters a word (in secret). The second
player must guess one letter at a time in order to discover the word. If the guessed letter is
not in the word, the player loses a ‘life’. The game ends when the player correctly guesses
the word or when they have used all 5 lives.
The program should display all unguessed letters with an appropriate symbol. For example,
if the chosen word is ‘elephant’, it should initially be displayed as:
********
If the second player enters the letter ‘e’ it should be displayed as:
e*e*****
EXTENSION TASKS:
● Ensure that the player cannot select the same letter more than once (or an error is
printed if they do). Attempting to enter the same letter more than once should not
count as a turn.
● Display on screen a list of the letters the player has already selected.
● Let the computer randomly select the word instead of entering one.
● Have different difficulty levels, each with different numbers of lives.
● Have your program gradually draw an ASCII art picture as the player loses their
guesses. How about a tree?
MARKING CRITERIA:
Knowledge
Meaningful variable names
Program has a start and an end (input and output)
Proper handling of user input, validation.
/5
Thinking
Logical flow of the hangman game, including the initialization, checking guessed letters,
and determining if the word is guessed.
Proper implementation of the game logic, ensuring the correct functionality of array
handling.
Adequate handling of incorrect user input and display of relevant messages.
Communication
Clear and user-friendly prompts for input, informative messages about the game state,
and a clear end-game message.
Presence of header and comments explaining complex sections of code or providing
context.
Clear documentation of the purpose of the program and how to interact with it.
A visually appealing and well-organized code that is easy to follow.
Application
Game runs without errors or crashes.
The game should run smoothly, allowing the user to make guesses, updating the
displayed word, and correctly determining when the game is won or lost.
Game provides an engaging and immersive experience for the player.
/10
/5
/10
Download