Update app.py
Browse files78 unmodified lines7980818283848518 unmodified lines10410510610778 unmodified linesif state is None:state = (initialize_board(), -1, None, None)board, player, last_user, last_ai = statex, y = evt.index; cell = 360//8; off = 20c = int((x-off)//cell); r = int((y-off)//cell)if 0<=r<8 and 0<=c<8 and not is_game_over(board):if apply_move(board, r, c, player):18 unmodified linesnew = gr.Button('New Game')img.select(click_handler, inputs=[state], outputs=[img, state], show_progress=True)new.click(reset_game, outputs=[img, state])demo.launch()78 unmodified lines798081828384858618 unmodified lines10510610710878 unmodified linesif state is None:state = (initialize_board(), -1, None, None)board, player, last_user, last_ai = statex, y = evt.index[0], evt.index[1]cell = 360//8; off = 20c = int((x-off)//cell); r = int((y-off)//cell)if 0<=r<8 and 0<=c<8 and not is_game_over(board):if apply_move(board, r, c, player):18 unmodified linesnew = gr.Button('New Game')img.select(click_handler, inputs=[state], outputs=[img, state], show_progress=True)new.click(reset_game, outputs=[img, state])demo.launch()
app.py+3-2