MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / __init__

Method __init__

animations/src/algo_stack.py:5–19  ·  view source on GitHub ↗
(self, scene, datas, **kwargs)

Source from the content-addressed store, hash-verified

3
4class AlgoStack(VGroup):
5 def __init__(self, scene, datas, **kwargs):
6 self.scene = scene
7 self.datas = datas
8 super().__init__(**kwargs)
9 # add base line
10 line = Line(start=UP, end=DOWN).scale(0.5).set_color(BLUE)
11 self.add(line)
12 self.base_line = line
13 # add node
14 self.nodes = []
15 for k in datas:
16 n = AlgoNode(str(k))
17 self.add(n)
18 self.nodes.append(n)
19 self.arrange()
20
21 def push(self, data):
22 n = AlgoNode(str(data))

Callers

nothing calls this directly

Calls 3

AlgoNodeClass · 0.85
scaleMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected