mirror of
https://github.com/swarm-game/swarm.git
synced 2025-01-07 16:55:59 +03:00
ca4a2b809d
Towards #1043. The eventual goal of this sublibrary split is to have a self contained library that can compose 2D grids of arbitrary content (perhaps colored pixels, or boolean values). This could be useful outside of the `swarm` game. I would also like to write unit tests for the structure recognizer that are independent of the `Entity` type. # Major Changes ## Direction module * Moved `Swarm.Language.Syntax.Direction` to `swarm-util`, since both `swarm-lang` and `swarm-topology` depend on it, but not on each other. * Removed the re-export of direction things from `Swarm.Language.Syntax` ## Structure module The `Swarm.Game.Scenario.Topography.Structure` module has been split into two: * `Swarm.Game.Scenario.Topography.Structure` * `Swarm.Game.Scenario.Topography.Structure.Type` The former retains the YAML parsing logic. The latter is agnostic of `Enitiy` type and the palette . At some future point, I might want to move the YAML parsing to this sublibrary while still retaining independence of `Entity` type. ## Structure recognizer The structure recognizer is independent of the content of Cells (i.e. it does not need to know what an `Entity` is), except: 1. during initialization 2. when retrieving the original cell content after recognition Type parameters for three kinds of data have been added to the recognizer: 1. `Cell`/`PCell` 2. `Entity` 3. `EntityName` Eventually it may be possible to eliminate one or two of these type parameters, with some refactoring. |
||
---|---|---|
.. | ||
blog | ||
image |