diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-24 12:32:42 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-24 12:32:42 +0200 |
commit | 749d47df38540342a7fe19029284b8115b03574a (patch) | |
tree | dbcc6c9a67644b7f73a00885cbafe8cb14dee3dd /src/sliceitoff/status | |
parent | c22159dfb5abda283d76248b474098cc2110935c (diff) |
scoring
Diffstat (limited to 'src/sliceitoff/status')
-rw-r--r-- | src/sliceitoff/status/status.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/sliceitoff/status/status.py b/src/sliceitoff/status/status.py index cacc84a..ea93b88 100644 --- a/src/sliceitoff/status/status.py +++ b/src/sliceitoff/status/status.py @@ -12,17 +12,16 @@ class Status(pygame.sprite.Group): """ Rebuilds statusline if needed """ super().update(**kwargs) score_str = ( - "\x12{:1d} \x03{:1d} \x0e{:02d} \xfe{:02d} " - "\x0f{:08d}").format( - Stats.level, - Stats.lives, - Stats.bonus // 1000, - 99 if Stats.percent == 100 else int(Stats.percent), - Stats.score) + f"\x12{Stats.level:<2d}" + f"\x03{Stats.lives:<2d}" + f"\x0e{Stats.bonus // 1000:<3d}" + f"\xfe{99 if Stats.percent == 100 else int(Stats.percent):<3d}" + f"\x0f{Stats.enemies-Stats.field_count:<3d}" + f"{Stats.score:08d}") if self.old_srt != score_str: self.empty() self.add( TextPage( score_str, - pos = (0, 220_000), + pos = (2_000, 220_000), size = (12_000, 0), font = 'lcd') ) |