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.
Logic-based hints ("Too High" / "Too Low") to guide your strategy.
Built entirely with Python's standard library - no pip dependencies required.
A fast, text-driven interface that feels right at home in a tiling window manager or standard shell.
Keeps a live count of your attempts to help you refine your guessing efficiency.
Instant startup and zero bloat, optimized for low-resource environments.
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
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
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
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!
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.
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.
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.
Feel free to Fork this repo if you want to add features like difficulty levels, high-score logging, or custom range settings!