Lines Matching refs:state
33 def computerzug(state):
34 xored = state[0] ^ state[1] ^ state[2]
36 return randommove(state)
38 s = state[z] ^ xored
39 if s <= state[z]:
43 def randommove(state):
44 m = max(state)
47 if state[z] > (m > 1):
49 rand = random.randint(m > 1, state[z]-1)
58 if self.game.state not in [Nim.CREATED, Nim.OVER]:
64 self.game.state = Nim.RUNNING
71 self.game.state = Nim.OVER
111 if self.game.state != Nim.RUNNING:
180 if self.game.state == Nim.OVER:
210 self.state = Nim.CREATED