Changed the implementation of Hangman game