tighogg

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

commit
97d65d0488800507a798a66fd587e2197fc70964
parent
3438af63740e03e2cad50d4b3c68ed3c938b2e05
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-09 07:47
switch leader on death

Diffstat

M tighogg.py 4 ++++

1 files changed, 4 insertions, 0 deletions


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

@@ -94,6 +94,10 @@ class Player:
   94    94         self.direction = self.base_direction
   95    95         self.running = False
   96    96 
   -1    97         if self == self.game.leader:
   -1    98             a = self.game.players.pop(0)
   -1    99             self.game.players.append(a)
   -1   100 
   97   101     def jump(self):
   98   102         if self.floor == self.y:
   99   103             self.dy = -JUMP_VELOCITY