/hangman-game-php-oop

Simple game for guessing words witch was created for study php OOP

Primary LanguagePHP

Hangman game - Console app.

This console application is a realization of the classic Hangman game. The game allows the user to guess a word randomly. After each letter is entered, information about the number of errors, and the current state of the gallows and open letters is displayed. At the end of the game, the result is displayed (win or lose), after which the user is offered to start a new game or exit the application

Gameplay

  1. When you start the app, you will see a welcome message.

  2. The app will prompt you to start a new game or exit.

  3. When you start a new game, a word is randomly selected and the guessing process begins.

  4. Enter the letters one at a time. After each letter is entered, you will see an error counter, current hangman status, and open letters.

  5. Keep entering letters until you guess the word or reach the error limit.

  6. When the game is complete, you will see the result (win or lose) and return to the start screen to select a new game or exit the app.

Important notes

  • All code is written in PHP.
  • The game uses the console interface.

Enjoy the game!