aroberge / reeborg

Enhanced Karel-the-robot clone
http://reeborg.ca/reeborg.html
Other
47 stars 36 forks source link

Task: replace current tile format in World #328

Closed aroberge closed 7 years ago

aroberge commented 7 years ago

Currently, for all types of artefact except tiles, the format is the same:

artefact[coords] = {obj1:, n1, obj2: n2}
tiles[coords] = "tile_name"

For simplicity, it might be preferable to use the same format for tiles; this would help simplify the drawing routine.

aroberge commented 7 years ago

This turns out to not be entirely desirable. What we have are two types:

artefact[coords] = {obj1:, n1, obj2: n2}
tiles[coords] = ["tile_name", ...]

With the generic artefact methods (#329), we can now easily handle these two types.