tighogg

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

commit
0e28cadbe341b17cdc0ba9ce699fca947fbb562a
parent
9015fbf53be5624cab9b7e451da4514d06cc7e2f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-11 08:00
round player position consistently

Diffstat

M tighogg.py 6 +++---

1 files changed, 3 insertions, 3 deletions


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

@@ -179,10 +179,10 @@ class Player:
  179   179             boon.get_cap('setaf', self.color)
  180   180             + boon.get_cap('bold')
  181   181         )
   -1   182         x0 = round(self.x - camera)
   -1   183         y0 = round(self.y + rows // 2)
  182   184         for dx, dy, c in self.get_chars():
  183    -1             x = round(self.x + dx - camera)
  184    -1             y = round(self.y + dy) + rows // 2
  185    -1             boon.move(y, x)
   -1   185             boon.move(y0 + dy, x0 + dx)
  186   186             sys.stdout.write(c)
  187   187         sys.stdout.write(boon.get_cap('sgr0'))
  188   188