def players(alive=None, human=None, barbarian=None, minor=None, active=None):
for player in playersOrTeams(gc.getMAX_PLAYERS(), gc.getPlayer, alive, human, barbarian, minor, active):
yield player
def teams(alive=None, human=None, barbarian=None, minor=None, active=None):
for team in playersOrTeams(gc.getMAX_TEAMS(), gc.getTeam, alive, human, barbarian, minor, active):
yield team
def playersOrTeams(count, accessor, alive, human, barbarian, minor, active):
for id in range(count):
playerOrTeam = accessor(id)
if not playerOrTeam.isNone() and playerOrTeam.isEverAlive():
if matchPlayerOrTeam(playerOrTeam, alive, human, barbarian, minor, active):
yield playerOrTeam