Class Kata "Hangman"

Write a class Hangman. The instance receives the searched word as a string via the constructor. The class also has a method RateLetter. The method receives a character as input and checks where the character occurs within the searched word. The method returns the part of the word that has been guessed up to this point.

public class Hangman {

   public Hangman(string searchedWord) { ... }

   public string RateLetter(char letter) { ... }

}

The following table shows an example of the process.

Method Input Output
-----------------------------------
ctor Developer
RateLetter u ---------
RateLetter e -e-e---e-
RateLetter n -e-e---e-
RateLetter o -e-e-o-e-
RateLetter r -e-e-o-er
RateLetter a -e-e-o-er
RateLetter d De-e-o-er
RateLetter l De-elo-er
RateLetter p De-eloper
Rate letter v Developer
en_USEnglish