Skip to content

Commit

Permalink
Uses New numwanations shard instead for more efficency.
Browse files Browse the repository at this point in the history
  • Loading branch information
DragoE9 committed May 2, 2023
1 parent 746ff97 commit 72618a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions UnitedWA.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,13 @@
total_endo = 0
total_member = 0
total_power = 0
WA_Nations = set(((api.wa(1).get_shards("members"))["members"]).split(","))
for region in regions[0]:
current_region = api.region(region)
delegate = current_region.delegate
nation = api.nation(delegate)
del_endos = (nation.endorsements).split(",")
num_endos = len(del_endos)
members = set(((current_region.get_shards("nations"))["nations"]).split(":"))
WA_members = WA_Nations.intersection(members)
WA_number = len(WA_members)
WA_number = int((current_region.get_shards("numwanations"))["numunnations"])
Power_Voting = [region,num_endos,WA_number,(num_endos+WA_number)]
Voting_Power.append(Power_Voting)
print("{:20}{:6}{:6}{:6}".format(region,num_endos,WA_number,Power_Voting[3]))
Expand Down

0 comments on commit 72618a4

Please sign in to comment.