
Relive the Innings: Mini Cricket Game Built Effortlessly with Amazon Q CLI
We all grew up playing cricket in the streets or parks, swinging bats and chasing balls with friends. I decided to rebuild that nostalgic mini cricket experience using Amazon Q CLI in just one prompt.
Published May 23, 2025
Introduction
Cricket was a big part of my childhood—playing in the streets, making stumps out of bricks, and dreaming of hitting sixes like the pros.
To relive those memories, I built a mini cricket game using Amazon Q CLI—and the best part?
I did it with just 1 prompt.
I did it with just 1 prompt.
Let’s bring back those cricket vibes—one line at a time!
I Refer these two blogs for my installation and Amazon Q CLI Setup.
Create a complete Mini Cricket Game in Python using the `tkinter` library. The game should include the following features:
- The player bats by clicking a number (1 to 6) using buttons.
- The computer (AI) randomly generates a number (1 to 6) for bowling.
- If the player's number matches the AI's number, the player is **out**.
- If the numbers don’t match, the player scores runs equal to their selected number.
- The score should be displayed in real-time.
- After the player is out, display a **Game Over** message with the final score and a **Play Again** button.
- Use clean, modular code with comments to explain each section.
- The GUI should include:
- A title ("Mini Cricket Game")
- 6 buttons for batting input (1 to 6)
- Labels showing:
- Player’s run
- AI's bowl
- Total Score
- Game status (e.g., "You’re Out!" or "Good Shot!")
- A restart button that resets the game when clicked.

- A solid foundation with a structured game loop
- Smooth and responsive player controls
- Collision logic that just works
- Real-time score tracking and updates
- Clean, modular code — easy to read and fully commented
Developer Insight:
Think Q CLI is only for writing code? Think again. It also helps you debug, optimize, and understand your code — all in one prompt.
Think Q CLI is only for writing code? Think again. It also helps you debug, optimize, and understand your code — all in one prompt.

Game Playing Drive Link:
https://drive.google.com/file/d/1BwnAMY78YMODo5CVmJpOhXDy1sx7o_ql/view?usp=drive_link
when play there itself in Amazon Q CLI it will install all the dependencies.
The documentation that is given by Amazon Q CLI

This project taught me:
1. Crafting the Perfect Game Loop - Creating that "just one more try" feeling that keeps players engaged through balanced difficulty and instant feedback
2. UI Psychology in Action - Using color psychology and visual design to enhance player experience and create emotional connections to the game
3. Elegant Problem-Solving - Transforming a complex childhood game into clean, modular code that's both efficient and maintainable
Download the code, run it, and modify it. Add music, levels, obstacles — make it your own!
GitHub Repo: https://github.com/Omshree999/snake_game