MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setup

Method setup

tools/python-3.11.9-amd64/Lib/turtledemo/nim.py:57–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self.game = game
56
57 def setup(self):
58 if self.game.state not in [Nim.CREATED, Nim.OVER]:
59 return
60 self.sticks = [randomrow(), randomrow(), randomrow()]
61 self.player = 0
62 self.winner = None
63 self.game.view.setup()
64 self.game.state = Nim.RUNNING
65
66 def move(self, row, col):
67 maxspalte = self.sticks[row]

Callers

nothing calls this directly

Calls 2

randomrowFunction · 0.85
setupMethod · 0.45

Tested by

no test coverage detected