当前位置: 首页>>代码示例>>Python>>正文


Python Team.get_teamname方法代码示例

本文整理汇总了Python中team.Team.get_teamname方法的典型用法代码示例。如果您正苦于以下问题:Python Team.get_teamname方法的具体用法?Python Team.get_teamname怎么用?Python Team.get_teamname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在team.Team的用法示例。


在下文中一共展示了Team.get_teamname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: which_team

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import get_teamname [as 别名]
                possession = line
                side = which_team(possession)
                if side == 1:
                    score, summary = clean_up(line)
                    home.stats_tracker(score + " " + summary)

                elif side == 2:
                    score, summary = clean_up(line)
                    away.stats_tracker(score + " " + summary)
                else:
                    print 'should never be here?'
                #print score, summary
            #continue

        if "<th>Time</th>" in line and start == 0:
            away.get_teamname(pbp_lines[i+1])
            home.get_teamname(pbp_lines[i+3])
            print away.team_name, "VS", home.team_name
        if "Start of 1st quarter" in line:
            start = 1
            continue
        if "End of 1st quarter" in line:
            game.set_qtr_score(1, score)
        if "End of 2nd quarter" in line:
            game.set_qtr_score(2, score)
        if "End of 3rd quarter" in line:
            game.set_qtr_score(3, score)
        if "End of 4th quarter" in line:
            # TODO: Overtime games
            game.set_qtr_score(4, score)
            print "END OF GAME"
开发者ID:andrewjylee,项目名称:story_teller,代码行数:33,代码来源:grab_pbp.py


注:本文中的team.Team.get_teamname方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。