Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rash023/magical-arena

A magical battle arena where two players fight until one dies. Each player has attributes for health, strength, and attack, and they take turns attacking and defending until one player's health reaches zero.
https://github.com/rash023/magical-arena

Last synced: 13 days ago
JSON representation

A magical battle arena where two players fight until one dies. Each player has attributes for health, strength, and attack, and they take turns attacking and defending until one player's health reaches zero.

Awesome Lists containing this project

README

        

# Magical Arena Project

## Overview

The Magical Arena project simulates a magical battle arena where two players fight until one dies. Each player has attributes for health, strength, and attack, and they take turns attacking and defending until one player's health reaches zero.

## Project Structure

The project is organized into the following main directories:

- **Design_implementation**: Contains the detailed design and implementation of the project.
- **prototype**: Contains the initial prototype.

### Design_implementation

This directory contains the final design and implementation of the Magical Arena project. It includes the source code, unit tests, and instructions for running the application.

#### Contents

- **`src/`**:
- `player.js`: Defines the `Player` class.
- `arena.js`: Defines the `Arena` class where the match logic is implemented.
- `index.js`: Entry point to run the game simulation.
- **`tests/`**:
- `player.test.js`: Unit tests for the `Player` class.
- `arena.test.js`: Unit tests for the `Arena` class.

## How to Run

### Prerequisites

- Node.js installed on your machine.

### Steps

1. **Navigate to the Design_implementation directory**:

```sh
cd Design_implementation
```

2. **Install the dependencies**:

```sh
npm install
```

3. **Run the game simulation**:
```sh
node src/index.js
```

### Running Tests

1. **Navigate to the Design_implementation directory**:

```sh
cd Design_implementation
```

2. **Run the unit tests**:
```sh
npm test
```

## Additional Information

For more detailed information about the design and implementation, including the explanation of test cases, please refer to the `README.md` file within the `Design_implementation` directory.

### Prototype

This directory contains the initial prototype of the Magical Arena project. It includes experimental code and early versions of the implementation.

#### Contents

- **frontend**:
- Initial versions of the arena.
- **backend**:
- Business logic of the arena.

## Additional Information

For more detailed information about the design and implementation, including the explanation of test cases, please refer to the `README.md` file within the `prototype` directory.

## Contact

For any questions or issues, please contact [email protected].