oxo_gui_complete.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:Mac-Python-3.X 作者: L1nwatch 项目源码 文件源码
def ev_click(row, col):
    global status
    if status["text"] == "Game Over":
        mb.showerror("Game over", "Game over!")
        return

    game = cells2game()
    index = (3 * row) + col
    result = oxo_logic.user_move(game, index)
    game2cells(game)

    if not result:
        result = oxo_logic.computer_move(game)
        game2cells(game)
    if result == "D":
        mb.showinfo("Result", "It's a Draw!")
        status["text"] = "Game Over"
    elif result == "X" or result == "O":
        mb.showinfo("Result", "The winner is: {}".format(result))
        status["text"] = "Game Over"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号