📜  防止玩家更改井字游戏中的现有条目 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:11.680000             🧑  作者: Mango

代码示例1
# Checking whether the position on the tic tac board is occupied or not.
def place_marker(board, marker, position):
    if board[position] == ' ':
        board[position] = marker
    else:
        print("That space is already occupied.")