Simple command line based Pokemon Battle Game pair programmed with Mansurual Karim (github.com/mansk). Built using Object Orientated Programming (OOP). Two player game to be run on a single machine, who take it turn to select a pokemon that are then pitted against one another.
- Python v3.11.1
- Make installed on your local machine. Search online for instructions relevant to your operating system.
-
Fork and clone this repo.
-
From the root directory, run the below command:
make requirements
This will create a virtual environment with the necessary dependencies (compiled from the file "requirements.in" and then installed from "requirements.txt").
-
Next, run:
make dev-setup
This will install "bandit" and "safety" to do security tests, as well as "black" to ensure code is PEP8 compliant, and finally "coverage" to check test coverage. Note that you will need a safety account (you should be prompted to register or login when first attempting to run the test suite, as detailed in stage 4 below).
-
(Optional) To execute the full range of checks (security tests, PEP8 compliance, and the test suite), run:
make run-checks
Test coverage for the key source code is over 90%, however, there are no tests for the file "src/simple_script.py", which is used to execute the command line game. There are also no tests for the script "src/pokemon_data.py", as this is simply the game data and does not contain any methods or functions.
Having followed the initial setup instructions above, simply run the below command:
make battle
Then follow the command line prompts to pit two players and their pokemon against each other!
- Add Doc strings.
- CI/CD.
- Optimise reading of pokemon data (e.g. transfer to a CSV file and read in to a pandas dataframe).
- Modify game to exit after 3 unsuccessful attempts (e.g. to a catch a pokemon that doesn't exist).
- Add ability to catch multiple pokemon, with chance to be unsuccessful.
- See further extensions at: https://l2c.northcoders.com/courses/de2-fun/pokemon-battler