This is the Elixir implementation of the classic Hangman game. It uses genserver and supervisor for fault tolerance.
- Elixir version - 1.6.1
- Mix
- Linux/ Windows Operating System
- Clone the hangman repository.
- Open
hangman/lib/loadfile.ex
- Edit parameter of Line 10, File.read(), to full location of
words1.txt
file according to path in your system. - Get your terminal into the hangman directory.
- Get your terminal to full screen.
- Enter command
iex -S mix
, to compile the hangman game. - Enter command
Super.start_link
to start the process. - Now, the last
Game.start
.
Enjoy and have fun!
The project is divided into modules for different functionality.
There are three basic modules :-
- Hangman.Play : starts the game and uses functions of other necessary modules when required.
- Hangman.Profile : stores the profile information about players, scores and leaderboard.
- Hangman.Loadhangman : reads the file containing words and returns a random word.
Note: This is free to use and modify.