diff --git a/asciiquarium_ng.py b/asciiquarium_ng.py index 6082e78..0797c0b 100755 --- a/asciiquarium_ng.py +++ b/asciiquarium_ng.py @@ -119,7 +119,10 @@ class Canvas: self._ck[row][col] = ck def render(self) -> str: - parts = ["\033[H", RESET] + # \033[2J clears the entire terminal (not just our canvas width), + # preventing stale characters when the terminal is wider than self.cols + # or after a resize. The full-canvas overwrite below keeps flicker minimal. + parts = ["\033[2J\033[H", RESET] sentinel = object() last_ck: object = sentinel for r in range(self.rows): @@ -461,7 +464,7 @@ class Aquarium: # ── Fish ───────────────────────────────────────────────────────────────── def add_all_fish(self): - count = max(1, (self.rows - 9) * self.cols // 350) + count = max(8, (self.rows - 9) * self.cols // 200) for _ in range(count): self.add_fish(None)