Skip to content

Instantly share code, notes, and snippets.

@brandonio21
Created October 2, 2016 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonio21/6c42dad9c6d8ce1d95b52b614be27c8f to your computer and use it in GitHub Desktop.
Save brandonio21/6c42dad9c6d8ce1d95b52b614be27c8f to your computer and use it in GitHub Desktop.
import time
import sys
border = '+---------------------------------+'
sides = '| |'
stretching_msg = 'Is this haunted room actually stretching?'
imag_msg = ' Or is it just your imagination?'
stretchrange = 20
sleeptime = 1
def p(msg):
sys.stdout.write(msg)
sys.stdout.flush()
messages = [
'Ensuring hinges creak in doorless chambers.',
'Ensuring strange sounds echo through the halls.',
'Ensuring candlelights flicker... ',
'Also ensuring that the air is deathly still ',
]
for msg in messages:
p('{}\r'.format(msg))
time.sleep(sleeptime*3)
print('Welcome, foolish mortals! ')
time.sleep(sleeptime*2)
print(border)
print(sides)
#for i in range(stretchrange):
#print(sides)
p('{}\r'.format(border))
time.sleep(sleeptime)
for i in range(stretchrange):
if i == int(stretchrange/3):
addition = stretching_msg
elif i == int(stretchrange/3)+1:
addition = imag_msg
else:
addition = ''
print('{} {}'.format(sides, addition))
p('{}\r'.format(border))
time.sleep(sleeptime)
print(border)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment