game.py 文件源码

python
阅读 50 收藏 0 点赞 0 评论 0

项目:Hangman 作者: zeroby0 项目源码 文件源码
def setword(self):  # selects word and places it in appropriate position
        i[0] = 0
        self.guessed = []

        if len(self.words) > 0:
            self.currentword = self.words.pop()
        else:

            gameover(1, self.words)

        while len(self.currentword) > 11:
            self.currentword = self.words.pop()
        self.theword.config(text='_ ' * len(self.currentword))

        for l in self.letters.values():  # #color of letters in letter box
            l.config(fg='white')
        self.update()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号