Skip to content

rhitamcoder/centry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🎯 Centry: Minimalist CLI Number Guessing Game

A streamlined, logic-driven number guessing game built in Python. Centry is designed for the terminal, focusing on speed, clean code, and a distraction-free experience for command-line enthusiasts.

🌟 Features

Precision Feedback:

Logic-based hints ("Too High" / "Too Low") to guide your strategy.

No-Install Design:

Built entirely with Python's standard library - no pip dependencies required.

Minimalist Workflow:

A fast, text-driven interface that feels right at home in a tiling window manager or standard shell.

Session Tracking:

Keeps a live count of your attempts to help you refine your guessing efficiency.

Lightweight Footprints:

Instant startup and zero bloat, optimized for low-resource environments.

🚀 Installation & Setup

1. Download the Tool

Open your terminal and clone this folder:

git clone https://github.com/rhitamcoder/centry.git

(Alternatively, click the green Code button on Github and select Download ZIP.)

To hide the folder:

mv centry .centry

Then:

cd .centry

2. Make it a Global Command

To run the tracker by simply typing 'centry' from anywhere in your terminal:

sudo ln -s $(pwd)/centry.py /usr/local/bin/centry && chmod +x centry.py

🎮 How to Use

Simply open your terminal and type:

centry

If you didn't do the "Global Command" above, you can run it manually inside the folder using:

python3 centry.py

The Logic

1. The Objective: Guess the secret number generated by the system.

2. Input: Type your numerical guess and press 'Enter'.

3. Feedback: The game provides immediate direction based on your proximity to the target.

4. Win Condition: Find the number in the fewest moves possible to beat your personal record!

🛠️ Requirements

Python 3.x: Works perfectly on any system with Python installed.

Linux/Unix Optimized: Tested on Arch and Ubuntu-based distributions. Will work on Fedora and MacOS as well.

🧠 Why I Built This

I created Centry to explore the fundamentals of game state management and user input validation. It serves as a proof of concept that even the simplest terminal applications can be polished, functional, and satisfying to use when built with a "minimalist-first" mindset.

📈 Key Learnings

By building this CLI game, I focused on:

1. Input Sanitation: Ensuring the game handles non-numeric inputs and edge cases without crashing.

2. Algorithm Efficiency: Implementing clean conditional logic to provide accurate user feedback.

3. Cross-Distro Compatibility: Maintaining a consistent experience across different Linux terminal emulators.

Contributing

Feel free to Fork this repo if you want to add features like difficulty levels, high-score logging, or custom range settings!

About

One wrong move and it’s over: Test your intuition against the machine in CENTRY, the ultimate 100-number guessing challenge.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages