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

Method notify_move

Lib/turtledemo/nim.py:155–168  ·  view source on GitHub ↗
(self, row, col, maxspalte, player)

Source from the content-addressed store, hash-verified

153 self.screen.tracer(True)
154
155 def notify_move(self, row, col, maxspalte, player):
156 if player == 0:
157 farbe = HCOLOR
158 for s in range(col, maxspalte):
159 self.sticks[(row, s)].color(farbe)
160 else:
161 self.display(" ... thinking ... ")
162 time.sleep(0.5)
163 self.display(" ... thinking ... aaah ...")
164 farbe = COLOR
165 for s in range(maxspalte-1, col-1, -1):
166 time.sleep(0.2)
167 self.sticks[(row, s)].color(farbe)
168 self.display("Your turn! Click leftmost stick to remove.")
169
170 def notify_over(self):
171 if self.game.model.winner == 0:

Callers 3

moveMethod · 0.45
makemoveMethod · 0.45
notify_moveMethod · 0.45

Calls 3

displayMethod · 0.95
colorMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected