Python Forum
Hangman tkinter help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hangman tkinter help
#2
Here, you test for a win but don't do anything with it. You will have to set some boolean to True or False, based upon number of guesses, or when a player wins, which would end the game.
     if '*' not in latestStr: #Finished with success
        # Display success message, check for 1 more round
        msg1="Congrts! The word is: "+word
        msg2="To continue the game, press ENTER" 

    else: # Current alphabet is not in original word
        missedLetters += (current+'')#Add letter to missed
        count += 1 #Increment number of attempts
  
        ## or -----------------------------------------------
        if count < 7 and not word_guessed():
            msg1="Guess a word: "+ latestStr
            msg2="Missed letter: "+ missedLetters
Reply


Messages In This Thread
Hangman tkinter help - by silverfang - Aug-03-2019, 04:04 AM
RE: Hangman tkinter help - by woooee - Aug-03-2019, 05:50 AM
RE: Hangman tkinter help - by silverfang - Aug-03-2019, 12:59 PM
RE: Hangman tkinter help - by woooee - Aug-03-2019, 05:04 PM
RE: Hangman tkinter help - by silverfang - Aug-03-2019, 05:55 PM
RE: Hangman tkinter help - by kaur975 - Aug-03-2019, 08:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Hangman Tkinter game RitaBomb2017 2 8,167 Jul-28-2018, 05:07 PM
Last Post: Windspar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020