https://github.com/mohsensami/robots-vs-dinosaurs
A service that provides a REST API to support simulating an army of remote-controlled robots to fight the dinosaurs
https://github.com/mohsensami/robots-vs-dinosaurs
fastapi python vuejs
Last synced: about 2 months ago
JSON representation
A service that provides a REST API to support simulating an army of remote-controlled robots to fight the dinosaurs
- Host: GitHub
- URL: https://github.com/mohsensami/robots-vs-dinosaurs
- Owner: mohsensami
- Created: 2022-12-23T11:35:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-25T20:25:16.000Z (over 3 years ago)
- Last Synced: 2025-01-22T13:39:13.396Z (over 1 year ago)
- Topics: fastapi, python, vuejs
- Language: Python
- Homepage:
- Size: 347 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Robots vs Dinosaurs
In this simulate, it's implementing a service that provides a REST API to support a war between robots and dinosaurs.
The key features are:
These are the features required:
### Backend
- Be able to create an empty simulation space - an empty 10 x 10 grid.
- Be able to create a robot in a certain position.
- Be able to create a dinosaur in a certain position.
- Issue instructions to a robot - a robot can move up, move down, move left, move right and attack.
- A robot attack destroys dinosaurs around it (the attack kills all the dinosaurs in up, left, right or
down cell).
- No need to worry about the dinosaurs - dinosaurs don't move.
- Two or more entities (robots or dinosaurs) cannot occupy the same position.
- Attempting to move a robot outside the simulation space is an invalid operation.
#### Run this command on your terminal
```
1. git clone https://github.com/mohsensami/robots-vs-dinosaurs.git
2. cd robots-vs-dinosaurs
```
#### Create virtual enviroment to install required libraries
```
1. pip install virtualenv
2. virtualenv venv
3. source venv/bin/activate
4. pip install -r requirements.txt
```
#### Run the project
```
uvicorn main:app --reload --port 8000
```
### Frontend
- A menu to create a new simulation (be able to add robots, dinosaurs)
- Display the simulation's current state.
#### Front Project Setup
```
cd frontend
yarn
yarn dev
```
### App Preview :
Start Game
Finish Game