tighogg

fighting game for the terminal
git clone https://git.ce9e.org/tighogg.git

commit
b45afe5f27eaa29ca1a6dc897d3461b124c1911b
parent
f60fd46ced1a48b512aad4ad45a70c7a79e3b0b2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-09 07:24
Gardening

Diffstat

M tighogg.py 7 ++++++-

1 files changed, 6 insertions, 1 deletions


diff --git a/tighogg.py b/tighogg.py

@@ -115,7 +115,12 @@ class Player:
  115   115     def render(self, camera):
  116   116         for i, line in enumerate(self._render()):
  117   117             if self.direction == LEFT:
  118    -1                 line = line[::-1].replace('/', '1').replace('\\', '/').replace('1', '\\')
   -1   118                 line = (
   -1   119                     line[::-1]
   -1   120                     .replace('/', '1')
   -1   121                     .replace('\\', '/')
   -1   122                     .replace('1', '\\')
   -1   123                 )
  119   124             x = round(self.x - camera) - 1 + len(line) - len(line.lstrip())
  120   125             y = round(self.y - 3 + i)
  121   126             if x < 0: