def board_entry(entry, entry_type, divide_by): result = "" if entry_type == ewcfg.entry_type_player: faction = ewutils.get_faction(life_state = entry[1], faction = entry[2]) faction_symbol = ewutils.get_faction_symbol(faction, entry[2]) result = "{} `{:_>15} | {}`\n".format( faction_symbol, "{:,}".format(entry[3] if divide_by == 1 else int(entry[3] / divide_by)), entry[0].replace("`","") ) elif entry_type == ewcfg.entry_type_districts: faction = entry[0] districts = entry[1] faction_symbol = ewutils.get_faction_symbol(faction.lower()) result = "{} `{:_>15} | {}`\n".format( faction_symbol, faction, districts ) return result
def board_entry(entry, entry_type, divide_by): result = "" if entry_type == ewcfg.entry_type_player: faction = ewutils.get_faction(life_state=entry[1], faction=entry[2]) faction_symbol = ewutils.get_faction_symbol(faction, entry[2]) number = int(entry[3] / divide_by) if number > 999999999: num_str = "{:.3e}".format(number) else: num_str = "{:,}".format(number) result = "{} `{:_>15} | {}`\n".format(faction_symbol, num_str, entry[0].replace("`", "")) elif entry_type == ewcfg.entry_type_districts: faction = entry[0] districts = entry[1] faction_symbol = ewutils.get_faction_symbol(faction.lower()) result = "{} `{:_>15} | {}`\n".format(faction_symbol, faction, districts) return result
def board_entry(entry, rank): faction = ewutils.get_faction(life_state=entry[1], faction=entry[2]) faction_symbol = ewutils.get_faction_symbol(faction) result = "{} `{:_>15} | {}`\n".format(faction_symbol, "{:,}".format(entry[3]), entry[0]) return result
def board_entry(entry, entry_type): result = "" if entry_type == ewcfg.entry_type_player: faction = ewutils.get_faction(life_state=entry[1], faction=entry[2]) faction_symbol = ewutils.get_faction_symbol(faction) result = "{} `{:_>15} | {}`\n".format(faction_symbol, "{:,}".format(entry[3]), entry[0]) elif entry_type == ewcfg.entry_type_districts: faction = entry[0].lower() districts = entry[1] faction_symbol = ewutils.get_faction_symbol(faction) result = "{} `{:_>15} | {}`\n".format(faction_symbol, faction, districts) return result