Skip to content

Commit

Permalink
feat: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Vangelis96 committed Jul 27, 2023
1 parent 42a9049 commit 34904c8
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,48 @@

It is important to configure the GDAL_NODATA in the tiff file. The GDAL_NODATA is used for the non-selectable areas.
The maps have to be tiff files. It is important that every map has the same size, otherwise it's not possible to show the maps properly.

### Map type

Select "Zones" if you want a game that defines the clickable fields in a TIFF that you attach and with an external calculation of the score and consequence maps. Select "Fields" if you want a game with a grid which is defined in the configuration and with maps that are predefined in attached TIFF files.

### Calculation URL

On level change, this is the url were the result of the level gets posted. Please check the interface definition:

#### Object that is sent to the calculation url

| Name of field | Type | Usage |
| --------------------- | ----------------- | --------------------------------------------- |
| round | number | Shows the current round number of the game |
| score | number | The total score of the round |
| game_id | string | the uuid of the game |
| allocation | Array[Field] | An array of field objects |

#### Field object

| Name of field | Type | Usage |
| --------------------- | ----------------- | --------------------------------------------- |
| id | number | The id of the field |
| lulc | number | The id of the production type that is set in this field |



#### Expected response from calculation url

| Name of field | Type | Usage |
| --------------------- | ----------------- | --------------------------------------------- |
| results | Array[result] | An array of result objects |



#### Result object

| Name of field | Type | Usage |
| --------------------- | ----------------- | --------------------------------------------- |
| name | string | A random string; unused |
| id | number | The id of the consequence map |
| score | number | The score of this consequence |
| url | string | The url to the tiff file of the consequence map |

The id that is given in this object must match the id that is configured to the fitting consequence map in the configuration.

0 comments on commit 34904c8

Please sign in to comment.