added building blocks for user interface
This commit is contained in:
parent
4e9654845c
commit
e0712804f5
21
user_interface/dice_animation1.txt
Normal file
21
user_interface/dice_animation1.txt
Normal 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 /
|
||||||
|
\_______ /´/
|
||||||
|
_-
|
21
user_interface/dice_animation2.txt
Normal file
21
user_interface/dice_animation2.txt
Normal 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_ /
|
||||||
|
-_
|
25
user_interface/user_interface.py
Normal file
25
user_interface/user_interface.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user