SlideShare a Scribd company logo
1 of 7
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
CS250: Data Structures and Algorithms
Project Final Report
Evil Hangman
Class: BEE5 - B
Members:
 HassanSaeed (5718)
 Taimoor Tahir (4628)
Submitted to: Sir.Asad Waqar
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
Evil Hangman
Abstract:
Evil Hangman is a game that cheats at the classic game Hangman. Normally, when writing a
computer to play Hangman, the computer picks a single word and accurately represents it as
the human player tries to guess all of the letters in the word. In Evil Hangman, the computer
instead maintains a list of every word in the English language, then continuously cuts down the
word list to try to dodge the player's guesses as much as possible.
Introduction:
The basic purpose of the program was to renew the conventional game of Hangman so that it
become almost impossible for the player to win. That game was played in a way that a word
was given to the player of specific length. Then the player guesses the word by hit and trial and
by his/her own knowledge. As the player guesses the word by guessing its alphabets he/she
wins. Now, the game has changed in such a way that the difficulty of the game is enhanced by
90%. In this game instead of a single word there is a whole list of possible words of the length
as per selected by the player. So, depending upon the guesses the program changes the word in
such a way that it became least probable for the player to win unless there is one and only one
word is possible in the list.
Now, it is not easy to synthesize a program like this because the words have to be checked
again and again. So, a really efficient program is not easy to write for this using simple arrays.
For this purpose in this program linked list is used with various helping functions. The details of
these functions and the working along with the way of programing is given under the heading
of implementation.
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
Implementation:
This program is implemented in such a way that its efficiency would not be ignored. So. The
program is implemented using linked list and various different helping functions in its linked list
class.
Firstly the player chooses the difficulty level. This is done by inserting the length of the word
and the number of guesses he/she wants. Then the program checks whether any word of the
given word length is present in the program or not. If there is, then it continues or if not, then it
asks again.
After selecting the difficulty level the program inserts all the words of the length given by the
player into a linked list by reading from the dictionary. Now all the possible word of a specific
length are present in a linked list.
In the next step the player is then asked for the word he/she wants to insert to play the game.
As the user inserts the alphabet in the program a check (bool) function checks the list if that
specific alphabet is present in all the words or not. If that alphabet is not present in every word
of the list then it removes all the words in the list that include this alphabet. This is done with
help of search and remove (void) function, which checks for a specific letter in all the words
present in the list to remove the words from the list in case of presence of that letter entered
by the player. If the alphabet is present in every word of the list then it places the word on the
same position as it is placed in the first word of the list and remove all the other words from the
list where that alphabet is not present at the specific position as in the first alphabet of the list.
This done with the help of remove other (void) and insert (void) function. First function checks
all the words in the list letter by letter for the alphabet entered by the player and its position, if
that specific letter is present at the same position as in the first word then it is not removed
else the word is removed from the list. While the second function helps to place the letter in
the word at its specific position in a string to display the word on the screen.
Same procedure continues till the player ran out of guesses or succeed in guessing the word.
When only one word remains in the list the game executes same as the old conventional
Hangman game. If the player was unable to guess the word then a list of all the words together
with a loss message and amount of words possible is displayed on the screen. If the player
succeed to win then a congratulatory message appears at the screen. At the end the game asks
the player that if he/she want to play again or not.
This is the table of the functions used in the linked list class.
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
Functions Name Purpose
void insert(string str) //For inserting a word into linked list
void remove(string str) //For removing a word from the linked list
void SearchAndRemove(char c) //For removing all the words from the
linked list having a specific alphabet
int length() //For measuring the number of words in the
linked list
void display() //For displaying all the words in the
linked list
bool check(char c) //For checking if a spcific alphabet is
present in all the words of the linked
list
void RemoveOther(char c) //For removing all the words which do not
have a specific letter at specific
positions
string place(char c) //For placing an alphabet at it's position
in the word
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
Results:
Below are a fewsamplesof the workingof the program
Sample run: Result Lost
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
Sample run: Result Win
National University of Sciences and Technology (NUST)
School of Electrical Engineering and Computer Science
_____________________________________________________________________________________
If a letter, already used, is entered again, an error is generated saying “You have already used
this word”. Although number of guesses remains the same.
Discussionand Conclusion:
Overall the game wasnot easyto program.There were a lotof problemsinitiallyandduringthe later
phasesof the program. Once,we understoodthe logicandmade a comprehensive flow chartof our
program inour mindsitbecame a biteasy.At laterstageswe have to come up withdifferentideasto
solve ourproblemsfordifferentstepsof our programwithdeepthinking.We applieddifferentlogicsto
performspecifictasksinthis waywe proceedtoour code by editing,changing andvarying.We alsotook
helpfromvariouswebsitesforsyntax issuesandvariousotherissuesespeciallyregardingstringsto
performdifferentfunctionsonwords,whichwere inthe formof strings.Atlastafterall the effortand
hard workwe succeededinmakingagreat program, whichwe enjoyedalot.

More Related Content

What's hot

20 Unique Uses of Excel Spreadsheets
20 Unique Uses of Excel Spreadsheets20 Unique Uses of Excel Spreadsheets
20 Unique Uses of Excel SpreadsheetsNick Weisenberger
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra pptGirdharRatne
 
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEMDATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEMAYESHA JAVED
 
mini project in c using data structure
mini project in c using data structure mini project in c using data structure
mini project in c using data structure SWETALEENA2
 
cpu scheduling
cpu schedulingcpu scheduling
cpu schedulinghashim102
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceAnuj Modi
 
Uses of MSExcel
Uses of MSExcelUses of MSExcel
Uses of MSExcelanam
 
Stacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti AroraStacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti Arorakulachihansraj
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraintsmadhav bansal
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
 
finding Min and max element from given array using divide & conquer
finding Min and max element from given array using  divide & conquer finding Min and max element from given array using  divide & conquer
finding Min and max element from given array using divide & conquer Swati Kulkarni Jaipurkar
 

What's hot (20)

Operating System lab
Operating System labOperating System lab
Operating System lab
 
20 Unique Uses of Excel Spreadsheets
20 Unique Uses of Excel Spreadsheets20 Unique Uses of Excel Spreadsheets
20 Unique Uses of Excel Spreadsheets
 
Database fragmentation
Database fragmentationDatabase fragmentation
Database fragmentation
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEMDATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
mini project in c using data structure
mini project in c using data structure mini project in c using data structure
mini project in c using data structure
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 
Architecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independenceArchitecture of-dbms-and-data-independence
Architecture of-dbms-and-data-independence
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
Uses of MSExcel
Uses of MSExcelUses of MSExcel
Uses of MSExcel
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Stacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti AroraStacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti Arora
 
Evolution of os
Evolution of osEvolution of os
Evolution of os
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
finding Min and max element from given array using divide & conquer
finding Min and max element from given array using  divide & conquer finding Min and max element from given array using  divide & conquer
finding Min and max element from given array using divide & conquer
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 

Viewers also liked

Dave's_CurriculumVitae_2015
Dave's_CurriculumVitae_2015Dave's_CurriculumVitae_2015
Dave's_CurriculumVitae_2015Dave Jackson
 
Continuous improvement engineer performance appraisal
Continuous improvement engineer performance appraisalContinuous improvement engineer performance appraisal
Continuous improvement engineer performance appraisalBritneySpears999
 
Construction safety manager performance appraisal
Construction safety manager performance appraisalConstruction safety manager performance appraisal
Construction safety manager performance appraisalBritneySpears999
 
Treinamento em compostagem
Treinamento em compostagemTreinamento em compostagem
Treinamento em compostagemHiram Sartori
 
AC to DC Converter - Product Information Guide
AC to DC Converter - Product Information GuideAC to DC Converter - Product Information Guide
AC to DC Converter - Product Information GuideBlacsyn
 
Pantallazo de cris
Pantallazo de crisPantallazo de cris
Pantallazo de criskimberlin172
 
pantallazo sexto semestre
pantallazo sexto semestrepantallazo sexto semestre
pantallazo sexto semestrekimberlin172
 
Diagnóstico sobre resíduos da construção civil
Diagnóstico sobre resíduos da construção civilDiagnóstico sobre resíduos da construção civil
Diagnóstico sobre resíduos da construção civilHiram Sartori
 
Olagunju pp presentation states of matter
Olagunju pp presentation states of matterOlagunju pp presentation states of matter
Olagunju pp presentation states of matterfunkeolagunju
 
Cach go tieng viet co dau tren HTKK
Cach go tieng viet co dau tren HTKKCach go tieng viet co dau tren HTKK
Cach go tieng viet co dau tren HTKKUnikey
 

Viewers also liked (13)

Dave's_CurriculumVitae_2015
Dave's_CurriculumVitae_2015Dave's_CurriculumVitae_2015
Dave's_CurriculumVitae_2015
 
Continuous improvement engineer performance appraisal
Continuous improvement engineer performance appraisalContinuous improvement engineer performance appraisal
Continuous improvement engineer performance appraisal
 
Construction safety manager performance appraisal
Construction safety manager performance appraisalConstruction safety manager performance appraisal
Construction safety manager performance appraisal
 
RLSkowronski, 06262015
RLSkowronski, 06262015RLSkowronski, 06262015
RLSkowronski, 06262015
 
Treinamento em compostagem
Treinamento em compostagemTreinamento em compostagem
Treinamento em compostagem
 
AC to DC Converter - Product Information Guide
AC to DC Converter - Product Information GuideAC to DC Converter - Product Information Guide
AC to DC Converter - Product Information Guide
 
Sunita rawat
Sunita rawatSunita rawat
Sunita rawat
 
Pantallazo de cris
Pantallazo de crisPantallazo de cris
Pantallazo de cris
 
pantallazo sexto semestre
pantallazo sexto semestrepantallazo sexto semestre
pantallazo sexto semestre
 
Diagnóstico sobre resíduos da construção civil
Diagnóstico sobre resíduos da construção civilDiagnóstico sobre resíduos da construção civil
Diagnóstico sobre resíduos da construção civil
 
Olagunju pp presentation states of matter
Olagunju pp presentation states of matterOlagunju pp presentation states of matter
Olagunju pp presentation states of matter
 
Cach go tieng viet co dau tren HTKK
Cach go tieng viet co dau tren HTKKCach go tieng viet co dau tren HTKK
Cach go tieng viet co dau tren HTKK
 
Pantallazo mau
Pantallazo mauPantallazo mau
Pantallazo mau
 

Similar to Evil Hangman report

CS 107 – Introduction to Computing and Programming – Spring 20.docx
CS 107 – Introduction to Computing and Programming – Spring 20.docxCS 107 – Introduction to Computing and Programming – Spring 20.docx
CS 107 – Introduction to Computing and Programming – Spring 20.docxfaithxdunce63732
 
Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...IOSR Journals
 
Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...IOSR Journals
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Muhammed Thanveer M
 
Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment mejoney4
 
Western Oregon University Page 1 of 2 CS-161.docx
 Western Oregon University            Page 1 of 2 CS-161.docx Western Oregon University            Page 1 of 2 CS-161.docx
Western Oregon University Page 1 of 2 CS-161.docxaryan532920
 
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx
CS10 Python Programming Homework 4 40 points Lists, Tupl.docxCS10 Python Programming Homework 4 40 points Lists, Tupl.docx
CS10 Python Programming Homework 4 40 points Lists, Tupl.docxmydrynan
 
IT Skill Lab Manual 20CS01P.pdf
IT Skill Lab Manual 20CS01P.pdfIT Skill Lab Manual 20CS01P.pdf
IT Skill Lab Manual 20CS01P.pdfTHANMAY JS
 
Assignment 4
Assignment 4Assignment 4
Assignment 4SneaK3
 
Cognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxCognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxBryan L. Mack
 
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docx
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docxCSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docx
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docxfaithxdunce63732
 
Analysis of sms feedback and online feedback using sentiment analysis for ass...
Analysis of sms feedback and online feedback using sentiment analysis for ass...Analysis of sms feedback and online feedback using sentiment analysis for ass...
Analysis of sms feedback and online feedback using sentiment analysis for ass...eSAT Journals
 
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATION
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATIONONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATION
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATIONcscpconf
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 
Etech. mitch. [autosaved]
Etech. mitch. [autosaved]Etech. mitch. [autosaved]
Etech. mitch. [autosaved]MaridelBajeta
 

Similar to Evil Hangman report (20)

CS 107 – Introduction to Computing and Programming – Spring 20.docx
CS 107 – Introduction to Computing and Programming – Spring 20.docxCS 107 – Introduction to Computing and Programming – Spring 20.docx
CS 107 – Introduction to Computing and Programming – Spring 20.docx
 
Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...
 
Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)
 
Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment me
 
Western Oregon University Page 1 of 2 CS-161.docx
 Western Oregon University            Page 1 of 2 CS-161.docx Western Oregon University            Page 1 of 2 CS-161.docx
Western Oregon University Page 1 of 2 CS-161.docx
 
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx
CS10 Python Programming Homework 4 40 points Lists, Tupl.docxCS10 Python Programming Homework 4 40 points Lists, Tupl.docx
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx
 
IT Skill Lab Manual 20CS01P.pdf
IT Skill Lab Manual 20CS01P.pdfIT Skill Lab Manual 20CS01P.pdf
IT Skill Lab Manual 20CS01P.pdf
 
Assignment 4
Assignment 4Assignment 4
Assignment 4
 
Cognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxCognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & Syntax
 
Advance excel
Advance excelAdvance excel
Advance excel
 
Chap04
Chap04Chap04
Chap04
 
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docx
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docxCSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docx
CSE 110 - ASSIGNMENT # 4 – Fall 2015 Due Tuesday Octobe.docx
 
Lk module3
Lk module3Lk module3
Lk module3
 
Interview Preparation
Interview PreparationInterview Preparation
Interview Preparation
 
Analysis of sms feedback and online feedback using sentiment analysis for ass...
Analysis of sms feedback and online feedback using sentiment analysis for ass...Analysis of sms feedback and online feedback using sentiment analysis for ass...
Analysis of sms feedback and online feedback using sentiment analysis for ass...
 
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATION
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATIONONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATION
ONLINE BANGLA HANDWRITTEN COMPOUND WORD RECOGNITION BASED ON SEGMENTATION
 
E3
E3E3
E3
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
Etech. mitch. [autosaved]
Etech. mitch. [autosaved]Etech. mitch. [autosaved]
Etech. mitch. [autosaved]
 

Evil Hangman report

  • 1. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ CS250: Data Structures and Algorithms Project Final Report Evil Hangman Class: BEE5 - B Members:  HassanSaeed (5718)  Taimoor Tahir (4628) Submitted to: Sir.Asad Waqar
  • 2. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ Evil Hangman Abstract: Evil Hangman is a game that cheats at the classic game Hangman. Normally, when writing a computer to play Hangman, the computer picks a single word and accurately represents it as the human player tries to guess all of the letters in the word. In Evil Hangman, the computer instead maintains a list of every word in the English language, then continuously cuts down the word list to try to dodge the player's guesses as much as possible. Introduction: The basic purpose of the program was to renew the conventional game of Hangman so that it become almost impossible for the player to win. That game was played in a way that a word was given to the player of specific length. Then the player guesses the word by hit and trial and by his/her own knowledge. As the player guesses the word by guessing its alphabets he/she wins. Now, the game has changed in such a way that the difficulty of the game is enhanced by 90%. In this game instead of a single word there is a whole list of possible words of the length as per selected by the player. So, depending upon the guesses the program changes the word in such a way that it became least probable for the player to win unless there is one and only one word is possible in the list. Now, it is not easy to synthesize a program like this because the words have to be checked again and again. So, a really efficient program is not easy to write for this using simple arrays. For this purpose in this program linked list is used with various helping functions. The details of these functions and the working along with the way of programing is given under the heading of implementation.
  • 3. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ Implementation: This program is implemented in such a way that its efficiency would not be ignored. So. The program is implemented using linked list and various different helping functions in its linked list class. Firstly the player chooses the difficulty level. This is done by inserting the length of the word and the number of guesses he/she wants. Then the program checks whether any word of the given word length is present in the program or not. If there is, then it continues or if not, then it asks again. After selecting the difficulty level the program inserts all the words of the length given by the player into a linked list by reading from the dictionary. Now all the possible word of a specific length are present in a linked list. In the next step the player is then asked for the word he/she wants to insert to play the game. As the user inserts the alphabet in the program a check (bool) function checks the list if that specific alphabet is present in all the words or not. If that alphabet is not present in every word of the list then it removes all the words in the list that include this alphabet. This is done with help of search and remove (void) function, which checks for a specific letter in all the words present in the list to remove the words from the list in case of presence of that letter entered by the player. If the alphabet is present in every word of the list then it places the word on the same position as it is placed in the first word of the list and remove all the other words from the list where that alphabet is not present at the specific position as in the first alphabet of the list. This done with the help of remove other (void) and insert (void) function. First function checks all the words in the list letter by letter for the alphabet entered by the player and its position, if that specific letter is present at the same position as in the first word then it is not removed else the word is removed from the list. While the second function helps to place the letter in the word at its specific position in a string to display the word on the screen. Same procedure continues till the player ran out of guesses or succeed in guessing the word. When only one word remains in the list the game executes same as the old conventional Hangman game. If the player was unable to guess the word then a list of all the words together with a loss message and amount of words possible is displayed on the screen. If the player succeed to win then a congratulatory message appears at the screen. At the end the game asks the player that if he/she want to play again or not. This is the table of the functions used in the linked list class.
  • 4. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ Functions Name Purpose void insert(string str) //For inserting a word into linked list void remove(string str) //For removing a word from the linked list void SearchAndRemove(char c) //For removing all the words from the linked list having a specific alphabet int length() //For measuring the number of words in the linked list void display() //For displaying all the words in the linked list bool check(char c) //For checking if a spcific alphabet is present in all the words of the linked list void RemoveOther(char c) //For removing all the words which do not have a specific letter at specific positions string place(char c) //For placing an alphabet at it's position in the word
  • 5. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ Results: Below are a fewsamplesof the workingof the program Sample run: Result Lost
  • 6. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ Sample run: Result Win
  • 7. National University of Sciences and Technology (NUST) School of Electrical Engineering and Computer Science _____________________________________________________________________________________ If a letter, already used, is entered again, an error is generated saying “You have already used this word”. Although number of guesses remains the same. Discussionand Conclusion: Overall the game wasnot easyto program.There were a lotof problemsinitiallyandduringthe later phasesof the program. Once,we understoodthe logicandmade a comprehensive flow chartof our program inour mindsitbecame a biteasy.At laterstageswe have to come up withdifferentideasto solve ourproblemsfordifferentstepsof our programwithdeepthinking.We applieddifferentlogicsto performspecifictasksinthis waywe proceedtoour code by editing,changing andvarying.We alsotook helpfromvariouswebsitesforsyntax issuesandvariousotherissuesespeciallyregardingstringsto performdifferentfunctionsonwords,whichwere inthe formof strings.Atlastafterall the effortand hard workwe succeededinmakingagreat program, whichwe enjoyedalot.