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


Python Team.return_name方法代码示例

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


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

示例1: npc_match

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import return_name [as 别名]
	def npc_match(team1, team2, players, teams):
		team1Name = Team.return_name(teams[team1])
		team2Name = Team.return_name(teams[team2])		
		difference= CoreGame.mute_compare_players(team1, team2, players, team1Name, team2Name)
		winner = CoreGame.find_winner(0, 0, 0, difference)
		if winner == 0:
			Team.won_game(teams[team1])
			Team.lost_game(teams[team2])
		elif winner == 1:
			Team.lost_game(teams[team1])
			Team.won_game(teams[team2])
开发者ID:Civil-JE,项目名称:Text-Based-LCS,代码行数:13,代码来源:MSim.py

示例2: playoffs

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import return_name [as 别名]
	def playoffs(teams):
		#Organize by score
		# i=0  No clue why these three lines were here. Leaving in case I remember
		# while i < 7: 
			# i += 1
		newTeams = sorted(teams, key=operator.attrgetter("wins"), reverse = True)
		playoffTeamIDs = [Team.return_id(newTeams[0]), Team.return_id(newTeams[1]), Team.return_id(newTeams[2]), Team.return_id(newTeams[3])]
		print(playoffTeamIDs)
		#Announce playoff participants (top 4 teams)
		print("The regular season has come to a close! Let's see which teams are making it to the playoffs!")
		print("The teams who reached the playoffs are: ")
		print(Team.return_wins(newTeams[0]),' - ', Team.return_losses(newTeams[0]),'   |', Team.return_name(newTeams[0]))
		print(Team.return_wins(newTeams[1]),' - ', Team.return_losses(newTeams[1]),'   |', Team.return_name(newTeams[1]))
		print(Team.return_wins(newTeams[2]),' - ', Team.return_losses(newTeams[2]),'   |', Team.return_name(newTeams[2]))
		print(Team.return_wins(newTeams[3]),' - ', Team.return_losses(newTeams[3]),'   |', Team.return_name(newTeams[3]))
		CoreGame.playoff_matches(teams, players, playoffTeamIDs)
开发者ID:Civil-JE,项目名称:Text-Based-LCS,代码行数:18,代码来源:MSim.py

示例3: display_team_records

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import return_name [as 别名]
	def display_team_records(teams):
		print('Win - Loss |Team Name')
		print("===========================================League Standings===========================================")
		print(Team.return_wins(teams[0]),' - ', Team.return_losses(teams[0]),'   |', Team.return_name(teams[0]))
		print(Team.return_wins(teams[1]),' - ', Team.return_losses(teams[1]),'   |', Team.return_name(teams[1]))
		print(Team.return_wins(teams[2]),' - ', Team.return_losses(teams[2]),'   |', Team.return_name(teams[2]))
		print(Team.return_wins(teams[3]),' - ', Team.return_losses(teams[3]),'   |', Team.return_name(teams[3]))
		print(Team.return_wins(teams[4]),' - ', Team.return_losses(teams[4]),'   |', Team.return_name(teams[4]))
		print(Team.return_wins(teams[5]),' - ', Team.return_losses(teams[5]),'   |', Team.return_name(teams[5]))
		print(Team.return_wins(teams[6]),' - ', Team.return_losses(teams[6]),'   |', Team.return_name(teams[6]))
		print(Team.return_wins(teams[7]),' - ', Team.return_losses(teams[7]),'   |', Team.return_name(teams[7]))
		print ("=================================================================================================")
		return ''
开发者ID:Civil-JE,项目名称:Text-Based-LCS,代码行数:15,代码来源:MSim.py

示例4: pc_match

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import return_name [as 别名]
	def pc_match(teams, teamToFace, players):
		#PC Match
		print("Your team will be facing off with %s!" % Team.return_name(teamToFace))
		print("Let's see how the lanes match up!")
		topDifference = CoreGame.compare_players_top(0, Team.return_id(teamToFace), players, Team.return_name(teams[0]), Team.return_name(teamToFace))
		delay(1)
		midDifference = CoreGame.compare_players_mid(0, Team.return_id(teamToFace), players, Team.return_name(teams[0]), Team.return_name(teamToFace))
		delay(1)
		jungDifference = CoreGame.compare_players_jung(0, Team.return_id(teamToFace), players, Team.return_name(teams[0]), Team.return_name(teamToFace))
		delay(1)
		botDifference = CoreGame.compare_players_bot(0, Team.return_id(teamToFace), players, Team.return_name(teams[0]), Team.return_name(teamToFace))
		delay(1)
		totalDifference = topDifference + botDifference + midDifference + jungDifference
		if totalDifference > 0:
			print("It looks like %s has the upper-hand in this game! Let's see how it works out for them!" % Team.return_name(teams[0]))
		elif totalDifference < 0:
			print("It looks like %s has the upper-hand in this game! Let's see how it works out for them!" % Team.return_name(teamToFace))
		elif totalDifference == 0:
			print('Neither team seems to have an advantage over the other! Amazing! Let\'s see how this turns out!')
		delay(3)
		winner = CoreGame.find_winner(topDifference, midDifference, jungDifference, botDifference)
		if winner == 0:
			print("Your team has won the game! Congratulations!")
			CoreGame.add_to_score(game, 1000)
			Team.won_game(teams[0])
			Team.lost_game(teamToFace)
			income = 1000 + Team.return_sponsor_funds(teams[0])
			print("Total winnings (including sponsor funds if you have one) are: ", income)
			Team.add_funds(teams[0], income)
		elif winner == 1:
			print("Oh no! It looks like your team wasn't able to pull off a win. Better luck next time!")
			Team.won_game(teamToFace)
			Team.lost_game(teams[0])
			income = 500
			print("For losing, your team is still rewarded: ", income)
			Team.add_funds(teams[0], income)
		else:
			print("===================SOMETHING WENT WRONG!========================")
			print("Error occured deciding a winner. Something other than 1 or 0 was output.")
			print(winner)
		return(winner)
开发者ID:Civil-JE,项目名称:Text-Based-LCS,代码行数:43,代码来源:MSim.py


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