2017-05-17 21:54:14 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
def show_depth(depth: int):
|
2017-05-21 12:08:29 +00:00
|
|
|
multiplier = 3
|
|
|
|
max_depth = 5
|
|
|
|
offset = int((max_depth - depth) / (2 / multiplier))
|
|
|
|
|
|
|
|
depth = depth * multiplier
|
|
|
|
offset -= int(depth % 2)
|
|
|
|
sys.stdout.write("\r|\x1b[K" + (u'█' * int(depth / 2)) + (u'▌' * int(depth % 2)) + ' ' * offset + "|\x1b[7m \x1b[0m\b")
|
|
|
|
|
2017-05-17 21:54:14 +00:00
|
|
|
sys.stdout.flush()
|