Coder Social home page Coder Social logo

adventure-world's Introduction

Adventure-World

A very boring text adventure game

Prerequisites

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.

Installing Microsoft C++ Build Tools

  1. Visit the Microsoft C++ Build Tools download page.
  2. Download and run the installer.
  3. Follow the installation instructions and make sure to include necessary C++ components.
  4. 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

Installing pyenv for Windows

Powershell

  1. 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.

  1. Close and re-open powershell.

  2. 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

  1. Install python3.8 with:
pyenv install 3.8.10

Usage

To use this application, follow these steps:

Setting up a Virtual Environment

macOS & Linux

  1. Open a terminal.

  2. Navigate to your project directory.

  3. Create a virtual environment:

    python3 -m venv env
  4. Activate the virtual environment:

    source env/bin/activate

Windows

This assumes the above prerequisites completed successfully.

  1. Open Windows Powershell.

  2. Navigate to your project directory.

  3. If your python version is >=3.9, set your local version with pyenv:

pyenv local 3.8.10
  1. Create a virtual environment:

    python -m venv env
  2. Activate the virtual environment:

    .\env\Scripts\activate

Installing Dependencies

  1. While inside the activated virtual environment, install dependencies:
    pip3 install -r requirements.txt

Running the Application

  1. Ensure your virtual environment is activated.

  2. Run the application:

    python3 main.py

Running Tests

  1. 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 the tests/ directory.

  2. 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.

Deactivating the Virtual Environment

When you're done using the application, deactivate the virtual environment:

deactivate

License

This project is licensed under the MIT License.

adventure-world's People

Contributors

tforde90 avatar tforde7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.