A Python-based command-line game where you guess the secret Pokémon based on stats and attributes using real-time data from the PokéAPI.
- Python 3.x: Core game logic and execution.
- Requests Library: For handling HTTP communication with the API.
- JSON: For parsing Pokémon data structures.
- Dynamic Filtering: Choose which generations (1 through 9) you want to include in the pool.
- Smart Feedback System: - Text Attributes: Checks for exact matches (Types, Color).
- Numeric Stats: Tells you if the secret value is higher (↑) or lower (↓) than your guess.
- Live Data: Fetches up-to-date Pokémon info (BST, Height, Weight, Generation) directly from the API.
- Replayability: Game loop allows for continuous play without restarting the script.
The project is organized into specific modules:
main.py: The entry point. Contains the game loop, user input handling, and the comparison logic (checking if guesses are correct, higher, or lower).search.py: The "engine" of the project. Handles API requests, translates generation numbers, and creates the structured data dictionary for the game.
- Run the script.
- Select the generations you want to guess from (e.g.,
1, 2, 3or9). - Type the name or the pokedex number of a Pokémon.
- The game will compare your guess with the secret Pokémon:
✓: Correct match.X: Incorrect match.↑: The secret value is higher.↓: The secret value is lower.
- Keep guessing until you find the secret Pokémon!
- "Give Up" option to reveal the answer.
- Add a hint system that gives the pokedex entry after some tries.
- Install the requirements: Use the command below to install the requirements:
pip install requests