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

Method __init__

Lib/turtledemo/nim.py:115–130  ·  view source on GitHub ↗
(self, game)

Source from the content-addressed store, hash-verified

113
114class NimView(object):
115 def __init__(self, game):
116 self.game = game
117 self.screen = game.screen
118 self.model = game.model
119 self.screen.colormode(255)
120 self.screen.tracer(False)
121 self.screen.bgcolor((240, 240, 255))
122 self.writer = turtle.Turtle(visible=False)
123 self.writer.pu()
124 self.writer.speed(0)
125 self.sticks = {}
126 for row in range(3):
127 for col in range(MAXSTICKS):
128 self.sticks[(row, col)] = Stick(row, col, game)
129 self.display("... a moment please ...")
130 self.screen.tracer(True)
131
132 def display(self, msg1, msg2=None):
133 self.screen.tracer(False)

Callers

nothing calls this directly

Calls 6

displayMethod · 0.95
StickClass · 0.85
colormodeMethod · 0.80
bgcolorMethod · 0.80
tracerMethod · 0.45
speedMethod · 0.45

Tested by

no test coverage detected