Overview
This blog walks you through the development of a Stone Paper Scissors game built using Amazon Q CLI, an AI-powered coding assistant that made development faster, smoother, and more enjoyable.
I chose this project because it's a fun and simple way to learn Python, explore clean code architecture, and test the power of Amazon Q CLI in an interactive development environment.
By the end of this blog, you'll learn:
- How to install and configure Amazon Q CLI
- How to iteratively build a Python game using AI-generated suggestions
- How Amazon Q simplifies testing, debugging, and structuring code
Project Setup & Development
Setting Up Amazon Q CLI
Prerequisites
- An AWS account
- A working Python environment
- WSL (for Windows users)
Installation Steps
For Windows Users (WSL Setup):
wsl -d Ubuntu
💡 If you get
WSL_E_DISTRO_NOT_FOUND
, the below command will install Ubuntu distribution
wsl --install -d Ubuntu
🔗 I referred to this guide for installing Amazon Q CLI on Windows
Start chatting with Amazon Q:
q chat
Planning the Game
I first outlined the core requirements:
- Player vs Computer gameplay
- Score tracking
- Replay option
- Clean terminal UI with color support
Then, I structured the project with the following folders:
project-root/
│
├── src/
│ ├── game_engine.py
│ ├── utils.py
│ └── run_game.py
│
├── assets/
│ └── ascii_art.txt
Building with Amazon Q CLI
Initial Prompt
I started by asking:
"Help me create a stone paper scissors game in Python with a clean architecture.
AI Prompt: Stone-Paper-Scissors with Pixel Art & 8-Bit Music
Target Library: PyGame (with Pyganim for pixel animations)
Style: Retro arcade vibe, dynamic AI, and special moves"
Amazon Q provided a basic structure with separate functions for input handling, logic, and scoring.
Iterative Development
I used follow-up prompts like:
- "Add colorful terminal output to the game"
- "Implement score tracking functionality"
Amazon Q responded with helpful suggestions using libraries like colorama
and added features step-by-step, reducing manual effort.
Key Code Components
Some valuable code snippets from Q included:
- A score dictionary to track wins
- A function for randomized computer moves
- A clean game loop with replay options
I refined variable names, added error handling, and tweaked color schemes for better UX.
Testing & Debugging with Amazon Q
Whenever I faced errors (like input mismatches or color issues), I simply asked:
"Fix this ValueError when input is invalid"
"Add unit tests for the game logic"
Amazon Q provided clear fixes and even mocked input()
for testable functions.
Deployment
Running the Game
To play the game, simply run:
python src/run_game.py
You'll see:
- Colorful prompts
- Real-time score updates
- ASCII visuals (from
assets/
)
Screenshots
Click the image above to watch the gameplay demo on YouTube
Lessons Learned
Pros of Using Amazon Q CLI
- Super-fast prototyping
- Clean, modular code generation
- Helpful debugging prompts
- Smart suggestions for best practices
Tips for Others
- Break down tasks into short prompts
- Use follow-ups to refine code
- Always test generated code manually
Conclusion
This project demonstrated how Amazon Q CLI can accelerate even small projects like games while encouraging clean architecture and modular design.
If you’re learning Python or want to prototype apps efficiently, give Amazon Q CLI a try!
Top comments (5)
Pretty cool how you broke it down step by step- honestly, seeing tools like Amazon Q speed things up makes me wish I had this back when I started.
Thank you so much! I totally get what you mean- tools like Amazon Q has really changed the game. Honestly, this support feels like having a mentor on-call, especially when you're building something from scratch!
Love how you emphasized modular code and interactive tweaks with Q - did Amazon Q change how you approached debugging or planning compared to coding without AI?
Absolutely! Using this AI assistant definitely shifted how I approached debugging. Instead of spending a lot of time researching smaller implementation details, I could focus more on designing the structure of the game and iteratively improving it.
Nice!