Skip to content

Commit

Permalink
Fix bug where negative HP let you live forever
Browse files Browse the repository at this point in the history
  • Loading branch information
seansawyer committed Oct 13, 2019
1 parent a2be44c commit 317d99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pmrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def main() -> None:
# find the indices of the dead ones
mobs_coords = [coords for _, coords in filter(lambda e: e[0] not in dead_mobs, enumerate(mobs_coords))]
mobs_hp = [hp for _, hp in filter(lambda e: e[0] not in dead_mobs, enumerate(mobs_hp))]
dying = player_hp == 0
dying = player_hp <= 0
winning = player_coords == exit_coords


Expand Down

0 comments on commit 317d99a

Please sign in to comment.