diff --git a/user_interface/dice_animation1.txt b/user_interface/dice_animation1.txt new file mode 100644 index 0000000..dc94c8a --- /dev/null +++ b/user_interface/dice_animation1.txt @@ -0,0 +1,21 @@ + + + ________ + ´´/ o / \ + / / o \ + /_____o_/ . + . \ o /´´ ________ + \ o o \ / /\ \`` + \ \o/ /o \ o o \ + `` \_o___o_ / / \ \ + /o o o \_o____o_\ + ``\ / / + _______ \ o / / + ´´/ \ \ \ / o / + /o \ o \ \/________/´´ + /o \_______. + .o o /o / + \ o / / + \o / o / + \_______ /´/ + _- diff --git a/user_interface/dice_animation2.txt b/user_interface/dice_animation2.txt new file mode 100644 index 0000000..50343e1 --- /dev/null +++ b/user_interface/dice_animation2.txt @@ -0,0 +1,21 @@ + + + ________ + /\ o \`` + /o \ o \ + ´´/ \ ____o_\ + . / / -=-______ + \ o / o o / / o o / \ + \ / / / o / o \ + \_o___o_ / / o o / \ + -_ /______ / o o \ + \ \ /´/ + ________ \ \ o / + / / \`` \ o \ / + / o / o \ `\ _______\/ + /_______ . + . \ / + \ o o \ / + \ o o \o/ + \`\_o___o_ / + -_ diff --git a/user_interface/user_interface.py b/user_interface/user_interface.py new file mode 100644 index 0000000..d6fd4e8 --- /dev/null +++ b/user_interface/user_interface.py @@ -0,0 +1,25 @@ +"""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()