leagues.py 文件源码

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

项目:studsup 作者: ebmscruff 项目源码 文件源码
def schedule_matches(self):
        mySchedule = []
        # for each home team
        for home in range(len(self.clubs)):
            for away in range(len(self.clubs)):
                if home == away:
                    continue
                # schedule will be in order at first 
                match = Match(self.clubs[home], self.clubs[away])
                mySchedule.append(match)
                # TODO: This will need majorly improved.
                # Issue created on github
                away += 1
        # shuffle that schedule 
        random.shuffle(mySchedule)
        # set current schedule to the new one
        self.schedule = mySchedule
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号