game_manager.py 文件源码

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

项目:mau_mau_bot 作者: jh0ker 项目源码 文件源码
def new_game(self, chat):
        """
        Create a new game in this chat
        """
        chat_id = chat.id

        self.logger.debug("Creating new game in chat " + str(chat_id))
        game = Game(chat)

        if chat_id not in self.chatid_games:
            self.chatid_games[chat_id] = list()

        # remove old games
        for g in list(self.chatid_games[chat_id]):
            if not g.players:
                self.chatid_games[chat_id].remove(g)

        self.chatid_games[chat_id].append(game)
        return game
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号