Skip to content

Commit

Permalink
Fix bug: Player got negative rep unintentionally
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWritesCode committed Oct 7, 2022
1 parent bfb017e commit b42ac68
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,9 @@ def rep_change(stats, rep_score, sold):

print(f'{cyan("Reputation update:")}')
print('------------------------------------')

if rep_percent > 0.5:
print('HAPPY CUSTOMERS and GREAT PERFORMANCE!')
elif rep_percent < 0.5:
elif rep_percent < -0.5:
print('Bad performance... Check feedback on what to change.')

if rep_percent > 0.5 and c_rep < 5:
Expand All @@ -305,13 +304,13 @@ def rep_change(stats, rep_score, sold):
)
elif rep_percent > 0.5 and c_rep == 5:
print(gold("Reputation already at a 5!"))
elif rep_percent < 0.5 and c_rep > 0:
elif rep_percent < -0.5 and c_rep > 0:
stats["reputation"] -= 0.5
print(
f"{red('Reputation decrease:')}\
{gold('-' + str(stats['reputation']))}"
)
elif rep_percent < 0.5 and c_rep == 0:
elif rep_percent < -0.5 and c_rep == 0:
print(red("Reputation already at 0."))
else:
print("No reputation change")
Expand Down

0 comments on commit b42ac68

Please sign in to comment.