🎮 Building Anagram Blaster: My Retro Game Journey with Amazon Q Dev CLI

Hamna KaleemHamna Kaleem
4 min read

As someone active in the NLP community and a fan of word games, I’ve always loved the challenge and fun of anagrams. Having built a basic version of an anagram game on GitHub before, I wanted to take it to the next level; Anagram Blaster 2.0; this time leveraging AI-assisted development with Amazon Q Dev CLI. This blog post shares my journey: what inspired me, how AI helped, and what I learned along the way. 📓✨


💡 Why Anagram Blaster?

I picked Anagram Blaster because it’s a classic word puzzle that’s simple yet engaging, perfect for retro-style gameplay. 🎲👾
Plus, it ties directly into my NLP interests, making it a meaningful project for me. Since I had an earlier version on GitHub, this was a natural upgrade, adding smarter difficulty adjustments, better UX, and polishing the UI with a cool pixel-art vibe. 🎨🧩


🧠 Mind Mapping and Planning

Before diving into coding, I did some basic mind mapping myself. Mapping out the game flow, difficulty levels, scoring system, and user interactions helped me clarify the core logic and structure. Having a clear plan was key, but once I started coding with AI support, I realized I could focus more on game design and less on error handling. 🛠️🧠


🤖 Effective Prompting with Amazon Q

I quickly learned that the best AI results came from breaking down requests into clear, step-by-step prompts. 🧾✨

For example:
“Generate Flask API routes for serving scrambled words.”
“Write frontend JavaScript to handle user input and display feedback.”
“Add difficulty adjustment logic based on user streaks.”

This approach led to clean, functional code snippets that I could easily customize. The AI’s ability to handle classic programming challenges like validating words via an external dictionary API, maintaining game state, and asynchronous frontend-backend communication was impressive. ⚙️🧠


💻 Using Amazon Q Dev CLI on VSCode (Windows)

One of the best parts of this project was how effortless it was to use Amazon Q Dev CLI on VSCode in Windows. There was zero complex setup as I didn’t need to install a dozen dependencies or mess with configurations. Just install the extension, open the terminal, and start typing your prompts that’s it!
It’s super intuitive, and the way it integrates into your dev flow feels seamless. I could stay in VSCode, type natural-language requests, and get back usable code in seconds. Honestly, it made the whole development feel more creative and less mechanical, which is exactly what you want when building something fun like a game.


⚡ The Power and Limits of AI-Generated Code

Amazon Q’s generated code was surprisingly solid and well-commented, which made understanding and modifying it easier. However, it did occasionally repeat styling and scripting elements unnecessarily for example, some CSS styles and JavaScript functions overlapped or could be optimized further. But overall, the AI saved me at least half the development time compared to doing everything from scratch, which would probably have taken me double the time.


🔍 Code Highlight: Dynamic Difficulty and Validation

pythonCopyEdit@app.route("/check_answer", methods=["POST"])
def check_answer():
    global correct_streak, wrong_streak, current_difficulty
    data = request.get_json()
    guess = data.get("guess", "").lower()
    answer = data.get("answer", "").lower()

    if not guess or not answer:
        return jsonify({"result": "invalid", "message": "Missing guess or answer."}), 400

    dict_url = f"https://api.dictionaryapi.dev/api/v2/entries/en/{guess}"
    dict_res = requests.get(dict_url)

    if dict_res.status_code != 200:
        wrong_streak += 1
        correct_streak = 0
        if wrong_streak >= 2:
            current_difficulty = "easy"
            wrong_streak = 0
        return jsonify({
            "result": "invalid",
            "message": f"'{guess}' is not a valid English word. The correct word was '{answer}'.",
            "correct_word": answer,
            "difficulty": current_difficulty
        })

    if guess == answer:
        correct_streak += 1
        wrong_streak = 0
        if correct_streak >= 3:
            current_difficulty = promote_difficulty(current_difficulty)
            correct_streak = 0
        return jsonify({
            "result": "correct",
            "message": "Correct!",
            "difficulty": current_difficulty
        })
    else:
        wrong_streak += 1
        correct_streak = 0
        if wrong_streak >= 2:
            current_difficulty = "easy"
            wrong_streak = 0
        return jsonify({
            "result": "wrong",
            "message": f"Wrong! The correct word was '{answer}'.",
            "correct_word": answer,
            "difficulty": current_difficulty
        })

🎯 This logic ensures the game dynamically adjusts difficulty based on the player’s performance, making it more fun and challenging. 🎚️💪


🌐 Sharing with the Community

I’m really happy to share this improved Anagram Blaster with the retro gaming and NLP communities. The project is available on GitHub as version 2.0, and I’d love to get feedback and collaborate on further enhancements. 🔁🤝

🔗 If you want to try the game or check out the code, here’s the link: GitHub 🧩


💬 Final Thoughts

Using Amazon Q Dev CLI has been a great experience. It’s like having a coding partner who accelerates your workflow while letting you keep creative control.
While it’s not perfect and sometimes repeats code, it’s a real game changer for developers, especially for projects like mine that blend classic game concepts with modern tech.

I encourage other developers to explore AI-assisted coding and join the community challenges like #BuildGamesChallenge and #AmazonQDevCLI.
It’s a fantastic way to build, learn, and share. 🚀🛠️


🎉 Thank you for reading!
✨ Happy coding and gaming! 🎮✨

0
Subscribe to my newsletter

Read articles from Hamna Kaleem directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Hamna Kaleem
Hamna Kaleem