16-is-dead/user_interface/user_interface.py

26 lines
484 B
Python

"""user interface"""
import time
import os
def dice_animation():
for i in range(4):
plz_print('dice_animation1.txt')
time.sleep(0.25)
clear()
plz_print('dice_animation2.txt')
time.sleep(0.25)
clear()
def plz_print(filename):
with open(filename) as f:
bigstring = ""
for line in f:
bigstring = bigstring + line
print('\n' + bigstring)
def clear():
os.system('clear')
dice_animation()