[Style] Improve formatting to improve readability
This commit is contained in:
parent
3fbf31e5f9
commit
7ea31c9a71
|
@ -1,6 +1,6 @@
|
||||||
__author__ = "Lukas Mahler"
|
__author__ = "Lukas Mahler"
|
||||||
__version__ = "0.0.0"
|
__version__ = "0.0.0"
|
||||||
__date__ = "26.06.2023"
|
__date__ = "28.06.2023"
|
||||||
__email__ = "m@hler.eu"
|
__email__ = "m@hler.eu"
|
||||||
__status__ = "Development"
|
__status__ = "Development"
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ from src.RandomNumberGenerator import RandomNumberGenerator
|
||||||
|
|
||||||
|
|
||||||
class FadePercentage:
|
class FadePercentage:
|
||||||
|
|
||||||
def __init__(self, seed, percentage, ranking):
|
def __init__(self, seed, percentage, ranking):
|
||||||
self.seed = seed
|
self.seed = seed
|
||||||
self.percentage = percentage
|
self.percentage = percentage
|
||||||
|
@ -16,12 +17,14 @@ class FadePercentage:
|
||||||
|
|
||||||
|
|
||||||
class WeaponFadePercentage:
|
class WeaponFadePercentage:
|
||||||
|
|
||||||
def __init__(self, weapon, percentages):
|
def __init__(self, weapon, percentages):
|
||||||
self.weapon = weapon
|
self.weapon = weapon
|
||||||
self.percentages = percentages
|
self.percentages = percentages
|
||||||
|
|
||||||
|
|
||||||
class BaseCalculator:
|
class BaseCalculator:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.weapons = []
|
self.weapons = []
|
||||||
self.reversed_weapons = []
|
self.reversed_weapons = []
|
||||||
|
@ -94,9 +97,14 @@ class BaseCalculator:
|
||||||
sorted_percentage_results = sorted(percentage_results)
|
sorted_percentage_results = sorted(percentage_results)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
FadePercentage(i, self.min_percentage + (percentage_result * (100 - self.min_percentage)),
|
FadePercentage(
|
||||||
min(sorted_percentage_results.index(percentage_result) + 1,
|
i,
|
||||||
len(sorted_percentage_results) - sorted_percentage_results.index(percentage_result)))
|
self.min_percentage + (percentage_result * (100 - self.min_percentage)),
|
||||||
|
min(
|
||||||
|
sorted_percentage_results.index(percentage_result) + 1,
|
||||||
|
len(sorted_percentage_results) - sorted_percentage_results.index(percentage_result)
|
||||||
|
)
|
||||||
|
)
|
||||||
for i, percentage_result in enumerate(percentage_results)
|
for i, percentage_result in enumerate(percentage_results)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue