2017-05-17 21:54:14 +00:00
|
|
|
import sys
|
2017-05-23 17:04:10 +00:00
|
|
|
from . import parameters
|
2017-05-17 21:54:14 +00:00
|
|
|
|
2017-05-21 12:12:25 +00:00
|
|
|
def show_depth(depth: int, zoom: int=2):
|
|
|
|
offset = int((parameters.MAX_RECURSIONS - depth) / (2 / zoom))
|
2017-05-21 12:08:29 +00:00
|
|
|
|
2017-05-21 12:12:25 +00:00
|
|
|
depth = depth * zoom
|
2017-05-21 12:08:29 +00:00
|
|
|
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()
|