(state)
| 39 | return move |
| 40 | |
| 41 | def randommove(state): |
| 42 | m = max(state) |
| 43 | while True: |
| 44 | z = random.randint(0,2) |
| 45 | if state[z] > (m > 1): |
| 46 | break |
| 47 | rand = random.randint(m > 1, state[z]-1) |
| 48 | return z, rand |
| 49 | |
| 50 | |
| 51 | class NimModel(object): |
no test coverage detected
searching dependent graphs…