- A Multi-feature Hangman game written in Haskell, to be played in the console.
- Some Features:
- Visual hangman drawing,
- Quit at anytime, Heavy error-checking,
- Single (w/ word length) and multi-player playing option!
- Some Features:
- By Atif Chaudhry (Programming Languages @ Saint Louis University, Spring 2015).
- Hangman a game of guessing a word (or a phrase), one letter at a time
- In this version of the game, the player has 9 lives/chances to guess all the letters in the word.
- Download Haskell Platform: http://goo.gl/bfyWAW (Windows for me)
- Either Double click Hangman_2.0.hs or Right Click -> 'Open with GHCI'
- Alternative: run ghci command in console and enter :load Hangman_2.0.hs
- Call 'main' function to begin
- Example:
F:\Directory>ghci
-- Some text shows automatically
Prelude> :load Hangman_2.0.hs
-- Loaded module(s) are shown
*Main> main
-- Game begins
-
The game starts off with showing game's how-to, along with a game menu
○ Option 1: Given a length, a random word of that length is picked for you
○ Option 2: Player 2 picks a word (word is not shown/printed) for Player 1 to guess -
After the word is picked, the following set-up is shown
○ The total number of ' _ ' represent the length of the word, and each ' _ ' represents a letter
- Each turn the player guesses a letter. Only the first letter of input is considered (i.e. in 'abc' only 'a' is taken)
- If the guess is correct, all occurrences of the letter are revealed.
- For example, if the hidden word is 'paisa' and the guess was 'a' , the view becomes _ A _ _ A.
- The number of lives do NOT decrease on correct, invalid (i.e. #, /, $, 3), or duplicate guess(es).
- Gradually, the wrong guesses will accumulate, and the hangman drawing will continue to become complete