Skip to content

Commit

Permalink
Take into account if number of exit jingles is modified while in action
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-stepanov committed Apr 30, 2024
1 parent 93a88fe commit 8e59984
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions advent/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,12 @@ def handleKeyboard(self, key):
LOGGER.info(f'User: decrease number of exit jingles. Number decreased {NUM_EXIT_JINGLES + 1} --> {NUM_EXIT_JINGLES}')
else:
LOGGER.info(f'User: decrease number of exit jingles. The number is already at minimum (1)')
if self.exit_jingles > 1:
self.exit_jingles -= 1
elif key == 'J':
NUM_EXIT_JINGLES += 1
if self.exit_jingles > 0:
self.exit_jingles += 1
LOGGER.info(f'User: increase number of exit jingles. Number increased {NUM_EXIT_JINGLES - 1} --> {NUM_EXIT_JINGLES}')
elif key == 'h':
print('h - help')
Expand Down

0 comments on commit 8e59984

Please sign in to comment.