diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-29 00:30:39 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-29 00:30:39 +0200 |
commit | 5c5df6e068b2957987cb51b34d6930769424f8ca (patch) | |
tree | 1f6ce6ff479ee787a3da6f51a9c337bcd24b841a /src/sliceitoff/screens/levelup.py | |
parent | 27c7e16e4bd808ce1176f18b7a78c02ff4fa88ee (diff) |
stats as object
Diffstat (limited to 'src/sliceitoff/screens/levelup.py')
-rw-r--r-- | src/sliceitoff/screens/levelup.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/sliceitoff/screens/levelup.py b/src/sliceitoff/screens/levelup.py index 9331020..ef48b7b 100644 --- a/src/sliceitoff/screens/levelup.py +++ b/src/sliceitoff/screens/levelup.py @@ -1,23 +1,22 @@ from text import TextPage -from stats import Stats -def levelup_screen(): +def levelup_screen(stats = None): ( total_bonus, level_bonus, life_bonus, time_bonus, area_bonus, - herd_bonus) = Stats.calc_bonus() + herd_bonus) = stats.calc_bonus() text = ( " LEVEL UP BONUS!\n" " ===============\n" "\n" - f"Level{Stats.level:3d}\xee\x12\xef{level_bonus:9d}pts\n" - f"Lives{Stats.lives:3d}\xec\x03\xef{life_bonus:9d}pts\n" - f"Time{int(Stats.bonus/1000):4d}\xed\x0e\xef{time_bonus:9d}pts\n" - f"Area{int(Stats.percent):4d}\xe9\xfe\xef{area_bonus:9d}pts\n" - f"Herd{Stats.enemies-Stats.field_count:4d}" + f"Level{stats.level:3d}\xee\x12\xef{level_bonus:9d}pts\n" + f"Lives{stats.lives:3d}\xec\x03\xef{life_bonus:9d}pts\n" + f"Time{int(stats.bonus/1000):4d}\xed\x0e\xef{time_bonus:9d}pts\n" + f"Area{int(stats.percent):4d}\xe9\xfe\xef{area_bonus:9d}pts\n" + f"Herd{stats.enemies-stats.field_count:4d}" f"\xea\x0f\xef{herd_bonus:9d}pts\n" f"\n" f"Bonus{total_bonus:13d}pts\n") |