Lines Matching refs:game
54 def __init__(self, game): argument
55 self.game = game
58 if self.game.state not in [Nim.CREATED, Nim.OVER]:
63 self.game.view.setup()
64 self.game.state = Nim.RUNNING
69 self.game.view.notify_move(row, col, maxspalte, self.player)
71 self.game.state = Nim.OVER
73 self.game.view.notify_over()
90 def __init__(self, row, col, game): argument
94 self.game = game
111 if self.game.state != Nim.RUNNING:
113 self.game.controller.notify_move(self.row, self.col)
117 def __init__(self, game): argument
118 self.game = game
119 self.screen = game.screen
120 self.model = game.model
130 self.sticks[(row, col)] = Stick(row, col, game)
173 if self.game.model.winner == 0:
180 if self.game.state == Nim.OVER:
186 def __init__(self, game): argument
187 self.game = game
188 self.sticks = game.view.sticks
192 self.game.screen.onkey(self.game.model.setup, "space")
193 self.game.screen.onkey(self.game.view.clear, "Escape")
194 self.game.view.display("Press space bar to start game")
195 self.game.screen.listen()
201 self.game.model.notify_move(row, col)