13 lines
347 B
Python
13 lines
347 B
Python
import sys
|
|
|
|
def show_depth(depth: int):
|
|
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")
|
|
|
|
sys.stdout.flush()
|