erik-lance / Cataclysm-Digital-Companion

A digital companion for GAMEDES Elective
https://cataclysm-digital-companion.vercel.app
0 stars 0 forks source link

Map Data #5

Closed erik-lance closed 7 months ago

erik-lance commented 7 months ago

Add a map_data.json under /src/data/.

This will be a json file consisting of all the premade maps that users can play on. Each map will have a string name and int[][] tile to determine its contents. Example:

[
  {
    "id": 0,
    "name": "Classic",
    "tiles": [
      [ 0, 1, 0, 0, 2, 0, 0, 1, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 1, 0, 0, 2, 0, 0, 1, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [ 0, 1, 0, 0, 2, 0, 0, 1, 0]
    ]
  },
  {
    "id": 1,
    "name": "Star",
    "tiles": [
      [ 0, 0, 0, 0, 2, 0, 0, 0, 0],
      [ 0, 1, 0, 0, 0, 0, 0, 1, 0],
      [ 0, 1, 0, 0, 1, 0, 1, 1, 0],
      [ 0, 0, 1, 1, 1, 1, 1, 0, 0],
      [ 0, 1, 1, 1, 2, 1, 1, 1, 0],
      [ 0, 0, 0, 1, 1, 1, 0, 0, 0],
      [ 0, 0, 1, 0, 0, 0, 1, 0, 0],
      [ 0, 1, 0, 0, 0, 0, 0, 1, 0],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0]
    ]
  },
]
johnwhoyou commented 7 months ago

added in 88529ccfac556e323e6ef40032fb55d3a082337b