def play_tictactoe_turn(action, board_state, turn):
    """
    Input:
         action:
            0-8
         an index into the board array

         board_state:
            (0,1,0,None,None,None,None,None,None)
         a tuple of the board's state

         turn:
            1/0
         the player's who's turn it is

    Output:
         a new board state and the next person's turn:
            (0,1,0,None,None,None,None,None,1)
    """
    board = list(board_state)
    board[action] = int(turn)
    turn = not turn
    new_board_state = tuple(board)

    return new_board_state, turn