-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
40 changed files
with
343 additions
and
244 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/bash -xe | ||
|
||
cd $(git rev-parse --show-toplevel) | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
cd $SCRIPT_DIR/.. | ||
|
||
STACK_WORK=.stack-work-bench stack bench swarm:benchmark --benchmark-arguments "--color always $@" | ||
cabal bench --benchmark-options "--color always $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.