0% found this document useful (0 votes)
28 views6 pages

Dsa Report

The document describes a hangman game project created by a group of students. It includes details about the features and data structures used in the hangman game like stacks, queues and arrays. It also outlines each group member's roles and responsibilities in the project.

Uploaded by

numl-s23-61477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views6 pages

Dsa Report

The document describes a hangman game project created by a group of students. It includes details about the features and data structures used in the hangman game like stacks, queues and arrays. It also outlines each group member's roles and responsibilities in the project.

Uploaded by

numl-s23-61477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

DSA Project

Report/Document
Project: “Hangman
Game”
Group Members Name:
Nimra (CS-216)
Hanan Saeed (CS-205)
Umer Jutt (CS-214)
Nauman (CS-212)
Introduction to Hangman game:
Hangman is a classic word-guessing game where one player thinks of a
word and the other player tries to guess it by suggesting letters one at a
time. The word is represented by a series of dashes, each dash
representing a letter in the word. With each incorrect guess, a part of a
gallows and a stick figure of a hanged man is drawn. The player must
guess the word before the stick figure is completed, or they lose. It's a fun
and challenging game that tests vocabulary and deductive skills.

Features of Hangman Game:


Sure, here are some key features of the Hangman game:

1. Word Selection:
The game randomly selects a word from a predefined list of words or allows the
player to input a word for the opponent to guess.

2. Visual Representation:
Hangman typically includes a visual representation of the gallows and the
hanged man. This serves as a visual indicator of the player's progress and the
number of incorrect guesses allowed.

3. Letter Guessing:
Players guess letters one at a time to uncover the hidden word. The game
should provide feedback on whether the guessed letter is present in the word
and its position(s) if it is.

4. Limited Attempts:
Players have a limited number of incorrect guesses allowed before the hanged
man is complete. Once the figure is complete, the game ends, and the player
loses.
5. Scoring System:
The game includes a scoring system based on factors such as the number of
incorrect guesses, the length of the word, and the time taken to guess the word.

6. Word Categories:
To add variety and challenge, Hangman can include different word categories
such as animals, countries, movies, or any other thematic group.

7. Difficulty Levels:
The game may offer different difficulty levels, adjusting factors such as the
length of the word or the number of incorrect guesses allowed, to cater to
players of varying skill levels.

These features collectively make Hangman a popular and enjoyable game for
players of all ages.

Data Structures Used:

There are 3 major data structures used in the Hangman Game:


1. Array Data Structures
2. Stack Data Structures
3. Queue Data Structures
Why are these Data structures used?
1. Stack:
- Word Storage: Stacks are used to store the letters of the word to be guessed.
Each time a correct letter is guessed, it can be popped off the stack, making it a
convenient data structure for managing the remaining letters in the word.
- Undo Functionality: If the player guesses incorrectly, the game can easily
backtrack by pushing the guessed letter onto a stack. This allows for
implementing an "undo" functionality where the player can retract their last
guess.

2. Queue:
- Guess History: Queues can be used to maintain a history of guesses made
by the player. Each time a new letter is guessed, it can be enqueued, and if
needed, the oldest guess can be dequeued to limit the history size. This can be
useful for providing feedback to the player on their previous guesses.
3. Array:
- Word Representation: Arrays can efficiently represent the hidden word or
the letters guessed correctly so far. Each element of the array can correspond to
a letter in the word, allowing for easy indexing and updating as letters are
guessed.
- Random Word Selection: Arrays used to store a collection of words from
which the game randomly selects the word to be guessed. The array allows for
easy access to individual words and facilitates the random selection process.

Overall, the use of these data structures enhances the functionality and
organization of the Hangman game, making it more efficient, manageable, and
enjoyable for both players and developers.

JOB OF EACH GROUP MEMBER:


NIMRA KHAN
She has played a major role in designing the code and implementing the
methods used in the code. She has decided what type of data structures to
use, how and where to use them. She wrote the methods and their
implementation in this hangman game code.

Hanan Saeed
He has given the idea of what type of methods can be used in this game to
properly work. He properly explained the working of code in a written form
also, so that every member can visualize the game and work on its algorithms
without any confusion.

Nauman:
He has given the idea of how to design the hangman displayed parts and
also of setting the levels in the game.

Umer:
He has provided the list of guessed words to be categorized in the Easy,
Medium or hard level. He has told about time complexity of algorithms and also
about the randomly generated words to be guessed by the user.
Interface of the Game:
When User Guessed the word:
When the user unable to guess the word:

You might also like