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

Method __init__

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

Source from the content-addressed store, hash-verified

182class NimController(object):
183
184 def __init__(self, game):
185 self.game = game
186 self.sticks = game.view.sticks
187 self.BUSY = False
188 for stick in self.sticks.values():
189 stick.onclick(stick.makemove)
190 self.game.screen.onkey(self.game.model.setup, "space")
191 self.game.screen.onkey(self.game.view.clear, "Escape")
192 self.game.view.display("Press space bar to start game")
193 self.game.screen.listen()
194
195 def notify_move(self, row, col):
196 if self.BUSY:

Callers

nothing calls this directly

Calls 5

onkeyMethod · 0.80
valuesMethod · 0.45
onclickMethod · 0.45
displayMethod · 0.45
listenMethod · 0.45

Tested by

no test coverage detected