added building blocks for user interface

This commit is contained in:
adamercat 2020-12-16 16:02:08 +01:00
parent 4e9654845c
commit e0712804f5
3 changed files with 67 additions and 0 deletions

View File

@ -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 /
\_______ /´/
_-

View File

@ -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_ /
-_

View File

@ -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()