async def getClan(tag): async with aiohttp.ClientSession() as session: async with session.get( 'https://api.worldoftanks.eu/wot/clans/list/?application_id=0ecfda2435a084d16fa9e02ea75ee0db&search={}' .format(tag)) as r: if ((await r.json())['status'] == "ok" and (await r.json())['meta']['count'] >= 1): json = (await r.json())['data'][0] clan = Clan(json['clan_id'], json['name'], json['tag'], json['emblems']['x195']['portal']) await clan.getDetails(clan.id) await clan.getRating(clan.id) return clan else: return False
import random from clan import Clan from clan_member import ClanMember from fight import Fight from domination_fight import DominationFight clan_red = Clan("red") clan_green = Clan("green") clan_blue = Clan("blue") clans = [clan_red, clan_green, clan_blue] num_players = 210 all_players = [] for x in range(0, num_players / 3): red_clan_member = ClanMember("player_red_" + str(x), clan_red) green_clan_member = ClanMember("player_green_" + str(x), clan_green) blue_clan_member = ClanMember("player_blue_" + str(x), clan_blue) all_players.append(red_clan_member) all_players.append(green_clan_member) all_players.append(blue_clan_member) print clan_red print clan_green print clan_blue f = Fight() df = DominationFight()
level_list = [] EveryCat = [] AIcats = [] pygame.init() pygame.font.init() nameFont = pygame.font.SysFont('Comic Sans MS',30) # Set the height and width of the screen size = [SCREEN_WIDTH, SCREEN_HEIGHT] screen = pygame.display.set_mode(size) pygame.display.set_caption("Cats are evil") warriors = 0 WindClan = Clan("WindClan",warriors,EveryCat) #WindClan.AddCat(kitty,"Apprentice",EveryCat) #WindClan.SayCats() #WindClan.ChooseMentor(kitty) #ThunderClan = Clan("ThunderClan",warriors,EveryCat) #ThunderClan.SayCats() #ShadowClan = Clan("ShadowClan",warriors,EveryCat) #ShadowClan.SayCats() #RiverClan = Clan("RiverClan",warriors,EveryCat) #RiverClan.SayCats() #SkyClan isn't a real clan # Create the player player = GameEntity(6,'kit',RandomFur(),isAI = False) player.Setup() player.CreateSprite()
import random import sys from clan import Clan from clan_member import ClanMember from fight import Fight from domination_fight import DominationFight clan_red = Clan("red") clan_green = Clan("green") clan_blue = Clan("blue") clans = [ clan_red, clan_green, clan_blue ] num_players = 102 all_players = [] for x in range(0, num_players/3): red_clan_member = ClanMember("player_red_" + str(x), clan_red) green_clan_member = ClanMember("player_green_" + str(x), clan_green) blue_clan_member = ClanMember("player_blue_" + str(x), clan_blue) all_players.append(red_clan_member) all_players.append(green_clan_member) all_players.append(blue_clan_member) #print clan_red #print clan_green #print clan_blue f=Fight() df=DominationFight()