MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/turtledemo/nim.py:88–100  ·  view source on GitHub ↗
(self, row, col, game)

Source from the content-addressed store, hash-verified

86
87class Stick(turtle.Turtle):
88 def __init__(self, row, col, game):
89 turtle.Turtle.__init__(self, visible=False)
90 self.row = row
91 self.col = col
92 self.game = game
93 x, y = self.coords(row, col)
94 self.shape("square")
95 self.shapesize(HUNIT/10.0, WUNIT/20.0)
96 self.speed(0)
97 self.pu()
98 self.goto(x,y)
99 self.color("white")
100 self.showturtle()
101
102 def coords(self, row, col):
103 packet, remainder = divmod(col, 5)

Callers

nothing calls this directly

Calls 8

coordsMethod · 0.95
shapeMethod · 0.80
shapesizeMethod · 0.80
gotoMethod · 0.80
showturtleMethod · 0.80
__init__Method · 0.45
speedMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected