A very boring text adventure game
Running the application on Windows requires some extra steps. First, ensure you have the Microsoft C++ Build Tools installed. These tools are necessary for compiling certain dependencies.
- Visit the Microsoft C++ Build Tools download page.
- Download and run the installer.
- Follow the installation instructions and make sure to include necessary C++ components.
- Once installed, restart your system if required.
If you are on Windows and your python version is >=3.9, you will need a virtual environment with python3.8.10. This is best achieved by using pyenv in Windows Powershell. If your python version is <=3.8.10, you can skip this step. Check your python version with:
python --version
- To install run:
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
If you are getting any UnauthorizedAccess error as below then start Windows PowerShell with the "Run as administrator" option and run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Now re-run the above installation command.
-
Close and re-open powershell.
-
Verify the installation was successfull with:
pyenv --version
You should see the version number printed to the console. If the command is not recognised, follow hese instruction to verify your environment variables https://github.com/pyenv-win/pyenv-win/blob/master/README.md#manually-check-the-settings
- Install python3.8 with:
pyenv install 3.8.10
To use this application, follow these steps:
-
Open a terminal.
-
Navigate to your project directory.
-
Create a virtual environment:
python3 -m venv env
-
Activate the virtual environment:
source env/bin/activate
This assumes the above prerequisites completed successfully.
-
Open Windows Powershell.
-
Navigate to your project directory.
-
If your python version is >=3.9, set your local version with pyenv:
pyenv local 3.8.10
-
Create a virtual environment:
python -m venv env
-
Activate the virtual environment:
.\env\Scripts\activate
- While inside the activated virtual environment, install dependencies:
pip3 install -r requirements.txt
-
Ensure your virtual environment is activated.
-
Run the application:
python3 main.py
-
Execute the following command to run the test suite:
python -m pytest tests/
This command uses
pytest
to run all the test files located in thetests/
directory. -
After running the tests, review the output in the terminal. Any failures or errors encountered during testing will be displayed, allowing you to troubleshoot and fix issues.
When you're done using the application, deactivate the virtual environment:
deactivate
This project is licensed under the MIT License.