Created
October 2, 2016 20:16
-
-
Save brandonio21/6c42dad9c6d8ce1d95b52b614be27c8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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