pokemon-gym
v1.0.1
Published
Welcome to the **Pokemon Gym** project! This project simulates a simple Pokemon battle system where trainers can interact with various Pokemon, battle them, and perform various actions like Pokemon attacks, trainer actions, etc. It is built using **TypeSc
Downloads
105
Readme
Pokemon Gym
Welcome to the Pokemon Gym project! This project simulates a simple Pokemon battle system where trainers can interact with various Pokemon, battle them, and perform various actions like Pokemon attacks, trainer actions, etc. It is built using TypeScript and Jest for unit testing.
Prerequisites
Before you start, make sure you have the following installed on your machine:
- Node.js (version >=14.x)
- npm or yarn (for package management)
Installation
Follow these steps to get the project running locally on your machine:
Clone this repository to your local machine:
git clone https://github.com/your-username/pokemon-gym.git
Navigate to the project directory:
cd pokemon-gym
Install the required dependencies:
npm install
(Optional) If you want to run TypeScript code directly, install
ts-node
globally:npm install -g ts-node
Running the Project
To run the application, you can execute the following command:
ts-node src/index.ts
Replace index.ts
with your main entry file if it differs.
Running Tests
The project uses Jest for unit testing. To run the tests, simply use the following command:
npx jest
This will run all the tests in the project, and the results will be displayed in your terminal. If everything is set up correctly, you should see test results indicating whether all tests passed.
Test Files
The following files contain the tests for different parts of the system:
- Trainer.test.ts: Contains tests for the trainer-related functionality.
- Pokemon.test.ts: Contains tests for the Pokemon-related functionality.
Contributing
If you'd like to contribute to this project, follow these steps:
- Fork this repository.
- Create a new branch for your feature:
git checkout -b feature-name
- Make your changes and commit them:
git commit -am 'Add new feature'
- Push to your branch:
git push origin feature-name
- Create a Pull Request to the main repository.