Add Gallows to the Game

Learn to incorporate the gallows implementation into the game.

Let's incorporate the gallows into the game

We ask Ruby to take advantage of the services provided by gallows.rb in line 2. As per line 13, we display the gallows before each prompt and check if the player has lost the game. If they have lost, we show the hanged man and the message saying that the player has lost.

Get hands-on with 1200+ tech skills courses.