Skip to content

Hangman is a guessing game in HASKELL for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters within a certain number of guesses. I also made this a little more special by adding only Albanian name cities.

License

Notifications You must be signed in to change notification settings

baftjarjusufi/HANGMAN

Repository files navigation

HANGMAN

Hangman is a guessing game for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters within a certain number of guesses. I also made this a little more special by adding only Albanian name cities from Albania, Kosova and North Macedonia and the player can guess to 7 letters wrong.

Game is simple , you guess a letter and if it is correct it is added to the game. Though the origins of the game are unknown, a variant is mentioned in a book of children's games assembled by Alice Gomme in 1894 called Birds, Beasts, and Fishes. This version lacks the image of a hanged man, instead relying on keeping score as to the number of attempts it took each player to fill in the blanks.

How to run it ?

In order to run the code you need to make sure that you have ghcup installed in your machine and you just simply need to download it and open it with any IDE or code editor, but I recommend using Visual Studio Code since it is a free code editor platform and I used it. After opening the folder of the game in the VS code, write in the terminal the following to start playing the Hangman Guessing Game: First we need carefully to check the path so if you are not in the correct path always use the “cd (folder name)” but if it is in correct path just write this:

stack build ;

You need to wait a little and then you type:

stack exec hangman;

Screenshot

App Screenshot

Conclusion

Used Haskell for development since, its is a great development language to start on because of the following reasons: It is a powerful, expressive, and flexible language that is used in many fields, including finance, artificial intelligence, and web development. Haskell is a functional programming language, which means it is well-suited to representing and manipulating the data structures and algorithms involved in a game like hangman guessing game. It has a strong type system and a focus on immutability, which can help make your code more reliable and easier . Haskell is a declarative, functional language, which means that it focuses on what should be done rather than how it should be done.

About

Hangman is a guessing game in HASKELL for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters within a certain number of guesses. I also made this a little more special by adding only Albanian name cities.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published