pangiann / hangman

Hangman is a paper and pencil guessing game for two or more players.
0 stars 0 forks source link

[hangman-player] Document everything related to a Player in the Hangman Game #6

Open pangiann opened 2 years ago

pangiann commented 2 years ago

Let's take a step back and describe exactly how the game works:

  1. A user creates or loads an already created dictionary.
  2. Computer selects a random word from the dictionary
  3. A new round starts. The state of the game is initialized with attributes like:
  4. A player needs to be configured which will play the rounds.
  5. The player chooses the position and the character that they will guess.
  6. The round is played which returns the amount of points the player has won.
  7. Then we check if the player won the game (by guessing all the letters) or we should go for another round.
pangiann commented 2 years ago

Player Class

Represents the Player's State during the execution of the Game. This means that this class keeps tracks of the remaining lives of the player, the points they have gained so far. It also lets the player make a guess for each round.