ECE 2524

Introduction to Unix for Engineers

Hangman in the terminal -Playing against self or near human

Usage

The project: project_hangman (https://github.com/AndrewGS24/project_hangman) is a really cool game. Unfortunatley, I am reviewing this alone so I am playing against myself, which is not much competition. Nevertheless this game is an awesome idea and I plan on playing (and winning) against my roomates later on. The ‘README’ file had very clear instruction for once the game was made and all I ran was the following:

$ make
$ ./hangman purple color

where purple was the word to be guessed and color was the hint. Then the game ran exactly as expected.

Style

The code for this game was very organized. I was surprised when I opened your main file and you were able to compress all of the code as much as you all did. I am sure the functions helped with that, my only suggestion is:

-move the functions into another .c file

Philosophy

I think this game follows Doug McIlroys philosophy because:

-The program does one thing well, and exactly what it was supposed to, play hangman. -The output of the program was not cluttered and it did not give any extrenuous information. -And the code was seperated into necessary functions, which likely made coding the main function much easier.

However, I believe there is still room for improvement:

-When the game is being played, instead of waiting for a newline character to get the letter, you should try to pull the letter automatically. For my project I used a getch funtion I found online (www.daniweb.com/software-development/c/threads/148447/getch-implementation-in-unix) -Also when the playing the game, for appearance purposes it would be nice if the screen cleared each time and you seperated the underscores in the guessing word to tell exactly how many letters it has. -When playing the game and you lose you should reveal the word that stumped the player. -And finally if you have time you should include a single player option where the user can play against a random word generator.