basic functionality of hangman solver.