diff --git a/dlgr/griduniverse/csv_gridworlds.py b/dlgr/griduniverse/csv_gridworlds.py index c21442ba..b5cf66bf 100644 --- a/dlgr/griduniverse/csv_gridworlds.py +++ b/dlgr/griduniverse/csv_gridworlds.py @@ -10,6 +10,25 @@ def matrix2gridworld(matrix): """Transform a 2D matrix representing an initial grid state into the serialized format used by Gridworld. + + Example: + + +---------------+---------+--------------------+ + | w | stone | gooseberry_bush|3 | + | p1c1 | w | w | + | | | p3c2 | + | | p4c2 | | + | big_hard_rock | w | p2c1 | + +---------------+---------+--------------------+ + + Explanation: + + - "w": a wall + - "stone": item defined by item_id "stone" in game_config.yml + - "gooseberry_bush|3": similar to the above, with the added detail + that the item has 3 remaining uses + - "p2c1": player ID 2, who is on team (color) 1 + - Empty cells: empty space in the grid """ result = defaultdict(list) diff --git a/package.json b/package.json index 935e8859..ac54df54 100644 --- a/package.json +++ b/package.json @@ -50,5 +50,6 @@ "bugs": { "url": "https://github.com/Dallinger/Griduniverse/issues" }, - "homepage": "https://github.com/Dallinger/Griduniverse#readme" + "homepage": "https://github.com/Dallinger/Griduniverse#readme", + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }