def generate_game_words(num_words=20):
    """Generate a random selection of words for the Word Wrangler game.

    1. Create a flat list of all words
    2. Remove any duplicates
    3. Randomly select the requested number of words

    Args:
        num_words: Number of words to select for the game

    Returns:
        List of randomly selected words
    """
    # Create a flat list of all words from all categories
    all_words = []
    for category_words in WORD_CATEGORIES.values():
        all_words.extend(category_words)

    # Remove duplicates by converting to a set and back to a list
    all_words = list(set(all_words))

    # Randomly select words
    selected_words = random.sample(all_words, min(num_words, len(all_words)))

    return selected_words
Generate a random selection of words for the Word Wrangler game.

    1. Create a flat list of all words
    2. Remove any duplicates
    3. Randomly select the requested number of words

    Args:
        num_words: Number of words to select for the game

    Returns:
        List of randomly selected words
    
examples/word-wrangler-gemini-live/server/word_list.py