Compare commits

...

3 commits

2 changed files with 6 additions and 4 deletions

View file

@ -14,8 +14,9 @@ If you want an extra challenge, you could do hard mode, where the user must manu
You can also skip the password entry entirely if you'd prefer, by adding `--skip` to the flags. You can also skip the password entry entirely if you'd prefer, by adding `--skip` to the flags.
And if you'd like to preload sounds, in case of playback issues, add `--preload` to the flags. If you'd like to preload sounds, in case of playback issues, add `--preload` to the flags.
Finally, if you'd prefer not to have sound, you may add `--no-sound` to the flags.
Passwords Passwords
================ ================

View file

@ -30,7 +30,7 @@ _queueRunning = False
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False): def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False):
""" """
wrapper for curses.addstr() which writes the text slowely wrapper for curses.addstr() which writes the text slowly
""" """
if not fake_user: if not fake_user:
addSound("beep") addSound("beep")
@ -114,7 +114,7 @@ def _playQueue():
if _queueRunning: if _queueRunning:
return return
_queueRunning = True _queueRunning = True
while 1: while _soundCheck():
if len(_soundQueue) > 0: if len(_soundQueue) > 0:
_playSound(_soundQueue[0], True) _playSound(_soundQueue[0], True)
_soundQueue.pop(0) _soundQueue.pop(0)
@ -152,6 +152,7 @@ def addSound(file):
Add sounds to the queue Add sounds to the queue
""" """
global _soundQueue global _soundQueue
if soundCheck():
_soundQueue.extend([file]) _soundQueue.extend([file])