tighogg

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

commit
3093c24276abea84a9450a3716ea949b0a11c510
parent
c8227fe546cbd0ec032cea6e4100a3d936d3002d
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-09 15:33
add padding to death on out-of-screen

Diffstat

M tighogg.py 3 ++-

1 files changed, 2 insertions, 1 deletions


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

@@ -273,7 +273,8 @@ class Game:
  273   273                         self.running = False
  274   274 
  275   275                 # die on out-of-screen
  276    -1                 if abs(self.straggler.x - self.leader.x) > self.cols:
   -1   276                 distance = abs(self.straggler.x - self.leader.x)
   -1   277                 if distance > self.cols - 2 * BLOCK_WIDTH:
  277   278                     self.straggler.die()
  278   279 
  279   280                 # die on abyss