Skip to content

Commit b42ac68

Browse files
committed
Fix bug: Player got negative rep unintentionally
1 parent bfb017e commit b42ac68

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

game.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,9 @@ def rep_change(stats, rep_score, sold):
291291

292292
print(f'{cyan("Reputation update:")}')
293293
print('------------------------------------')
294-
295294
if rep_percent > 0.5:
296295
print('HAPPY CUSTOMERS and GREAT PERFORMANCE!')
297-
elif rep_percent < 0.5:
296+
elif rep_percent < -0.5:
298297
print('Bad performance... Check feedback on what to change.')
299298

300299
if rep_percent > 0.5 and c_rep < 5:
@@ -305,13 +304,13 @@ def rep_change(stats, rep_score, sold):
305304
)
306305
elif rep_percent > 0.5 and c_rep == 5:
307306
print(gold("Reputation already at a 5!"))
308-
elif rep_percent < 0.5 and c_rep > 0:
307+
elif rep_percent < -0.5 and c_rep > 0:
309308
stats["reputation"] -= 0.5
310309
print(
311310
f"{red('Reputation decrease:')}\
312311
{gold('-' + str(stats['reputation']))}"
313312
)
314-
elif rep_percent < 0.5 and c_rep == 0:
313+
elif rep_percent < -0.5 and c_rep == 0:
315314
print(red("Reputation already at 0."))
316315
else:
317316
print("No reputation change")

0 commit comments

Comments
 (0)