Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Hangman, New to programming

Hi,
I am trying to make a hangman game a player guesses a word and has a computer guess a letter to figure out the word, I know it needs to be based on most likely outcome and the computer would need to find the word as quickly as possible. It would also need to show the available words that are left in a list that is scrollable.

for example if the word I choose is 'donkey' and the computer guesses the 'o' 'k' and 'd' giving it 'do-k--' it would list the words that are possible then guess the next letter with the highest percentage

Just wondering if anyone has any starter code I can look at to try to take this apart and get something working

Comments

  • Malcolm_McLeanMalcolm_McLean Posts: 251Member ✭✭
    : Hi,
    : I am trying to make a hangman game a player guesses a word and has a
    : computer guess a letter to figure out the word, I know it needs to
    : be based on most likely outcome and the computer would need to find
    : the word as quickly as possible. It would also need to show the
    : available words that are left in a list that is scrollable.
    :
    : for example if the word I choose is 'donkey' and the computer
    : guesses the 'o' 'k' and 'd' giving it 'do-k--' it would list the
    : words that are possible then guess the next letter with the highest
    : percentage
    :
    : Just wondering if anyone has any starter code I can look at to try
    : to take this apart and get something working
    :
    I'd start out the other way round. Let the computer store the word and make the player guess.
    The reason is that if the computer guesses it requires a dictionary. Though such are available - that's how a spellchecker works, after all - there are various difficulties with them, like knowing how inflected endings are encoded, and accessing the API, which make the task rather difficult for a beginner.
Sign In or Register to comment.