diff --git a/user_interface/dice_animation1.txt b/dice_animation1.txt similarity index 100% rename from user_interface/dice_animation1.txt rename to dice_animation1.txt diff --git a/user_interface/dice_animation2.txt b/dice_animation2.txt similarity index 100% rename from user_interface/dice_animation2.txt rename to dice_animation2.txt diff --git a/user_interface/pling_animation b/pling_animation similarity index 100% rename from user_interface/pling_animation rename to pling_animation diff --git a/user_interface/user_interface.py b/user_interface/user_interface.py deleted file mode 100644 index 8361c50..0000000 --- a/user_interface/user_interface.py +++ /dev/null @@ -1,59 +0,0 @@ -"""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, 'r', encoding='utf8') as f: - bigstring = "" - for line in f: - bigstring = bigstring + line - print('\n' + bigstring) - - -def clear(): - if os.name == 'nt': # for windows - os.system('cls') - else: # for linux, mac - os.system('clear') - -def pling(current_roll): - with open('pling_animation', 'r', encoding='utf8') as f: - big_string = "" - animations = [] - scan_lines = '' - for line in f: - big_string = big_string + line - if line[0] == '$': - animations.append(big_string[:-2]) - big_string = '' - - dice_result = animations[current_roll[0] - 1] - for line in dice_result: - scan_lines += line - if line[0] == '#': - clear() - print(scan_lines[:-2]) - time.sleep(1) - scan_lines = "" - - #for item in animations: - #print(item) - #print('------------------------------------') - - -#dice_animation() -#for i in range(1,7): - #pling(i)