本文整理汇总了Python中models.Match.players方法的典型用法代码示例。如果您正苦于以下问题:Python Match.players方法的具体用法?Python Match.players怎么用?Python Match.players使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Match
的用法示例。
在下文中一共展示了Match.players方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Match
# 需要导入模块: from models import Match [as 别名]
# 或者: from models.Match import players [as 别名]
# for now -- since we don't know how leaver status works, we just use
# true
match["is_significant_p"] = True
# create the game
new_match = Match(match["id"], match["barracks_status_dire"],
match["barracks_status_radiant"], match["cluster"],
match["duration"], match["first_blood_time"],
match["game_mode"], match["human_players"],
match["leagueid"], match["negative_votes"],
match["positive_votes"], match["radiant_win"],
match["season"], match["starttime"],
match["tower_status_dire"], match["tower_status_radiant"],
match["is_significant_p"])
new_match.players = []
players = details["players"]
for p in players:
pl = {}
pl["win"] = False
pl["player_slot"] = p["player_slot"]
# 0, 1, 2, 3, 4 are Radiant
# 128, 129, 130, 131, 132 are Dire
if p["player_slot"] < 128: # Radiant
if match["radiant_win"] == True: