本文整理汇总了Python中match.Match.init方法的典型用法代码示例。如果您正苦于以下问题:Python Match.init方法的具体用法?Python Match.init怎么用?Python Match.init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类match.Match
的用法示例。
在下文中一共展示了Match.init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from match import Match [as 别名]
# 或者: from match.Match import init [as 别名]
difficulty=int(configuration["difficulty"])
nb_players_team=int(configuration["nb_players_team"])
match_length=int(configuration["duration"])
west_team_index,east_team_index=0,1
(teamA_filename,west_team_index,teamB_filename,east_team_index)=select_teams(display,nesfont,mainClock,west_team_index,east_team_index)
if (teamA_filename=="?"):
configuration["exit_menu"]="no"
#players_human_teamA,players_human_teamB,difficulty,nb_players_team,match_length,teamA_filename,teamB_filename=call_all_menus(display,nesfont,mainClock)
match=Match(teamA_filename,teamB_filename)
match.show_loading(display,nesfont)
match.init(players_human_teamA,nb_players_team,players_human_teamB,nb_players_team,difficulty,match_length)
while not match.is_finished:
screen = display.get_surface()
if (Inputs.player_just_Esc[1] or Inputs.player_just_Esc[2]):
match.is_finished=True
match.update()
match.draw(screen,nesfont)
display.update()
mainClock.tick(50)