def play(): b = board.init() for round in range(1,9): b = turn(b) board.draw(b) c = state.find_cycle(b) if c: pass if state.won(b): break
def play(): b = board.init() for r in range(9): b = turn(r, b) board.draw(b) c = state.find_cycle(b) if c: pos, symbol = prompt_resolve(r, c) b = state.collapse(b, pos, symbol) if state.won(b): print "Player %d won!" % playernum(r) break