-
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.
Parameterize scenario datatypes (#903)
Towards #873 ## Motivation The `Entity` datatype has a fair amount of state and extra fields that are not relevant to serializing a scenario (in particular, a world map) to a file. In this PR, the `Cell` record is renamed to `PCell` (representing "Parameterized Cell"), replacing `Entity` with a type parameter. This permits the introduction of a trimmed-down `Entity` type for the purpose of serialization. This lightweight type can also be a reliable `Map` key. A type alias `Cell` is created with the original `Entity` type as a parameter. The `WorldDescription` and `WorldPalette` are likewise parameterized on the `Cell` type.
- Loading branch information
Showing
3 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
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