swarm/scripts
Karl Ostmo ca4a2b809d
topography sublibrary (#1836)
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.
2024-06-02 20:53:34 +00:00
..
gen Update sublibrary graph generation script & cabal description (#1849) 2024-05-13 17:25:00 +00:00
normalize subdirectories for more scripts (#1831) 2024-05-10 17:32:23 +00:00
test topography sublibrary (#1836) 2024-06-02 20:53:34 +00:00
validate organize scripts with subfolders (#1800) 2024-04-11 02:20:45 +00:00
autoplay-tutorials.sh Recommend cabal (#1822) 2024-05-06 00:09:33 +00:00
build-game.sh Recommend cabal (#1822) 2024-05-06 00:09:33 +00:00
play.sh Recommend cabal (#1822) 2024-05-06 00:09:33 +00:00