-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make structures parseable independently of entity definitions (#1924)
This refactoring makes structures parseable independently of `Entity` and `Robot `definitions. We can define a `Palette` that maps to an arbitrary type, for example `RGBColor` instead of `Cell Entity`. ## Testing ``` scripts/test/run-tests.sh standalone-topography ```
- Loading branch information
Showing
27 changed files
with
418 additions
and
155 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
structures: | ||
- name: checker pair | ||
structure: | ||
palette: | ||
't': true | ||
'f': false | ||
map: | | ||
ttttffff | ||
ttttffff | ||
ttttffff | ||
ttttffff | ||
- name: checker quad | ||
structure: | ||
palette: | ||
't': true | ||
'f': false | ||
map: "" | ||
placements: | ||
- src: checker pair | ||
offset: [0, 0] | ||
truncate: false | ||
- src: checker pair | ||
offset: [0, -4] | ||
truncate: false | ||
orient: | ||
up: south | ||
- name: checker octo | ||
structure: | ||
palette: | ||
't': true | ||
'f': false | ||
map: "" | ||
placements: | ||
- src: checker quad | ||
offset: [0, 0] | ||
truncate: false | ||
- src: checker quad | ||
offset: [8, 0] | ||
truncate: false | ||
- src: checker quad | ||
offset: [0, -8] | ||
truncate: false | ||
- src: checker quad | ||
offset: [8, -8] | ||
truncate: false | ||
placements: | ||
- src: checker octo | ||
offset: [0, 0] | ||
truncate: false | ||
- src: checker octo | ||
offset: [16, 0] | ||
truncate: false | ||
- src: checker octo | ||
offset: [0, -16] | ||
truncate: false | ||
- src: checker octo | ||
offset: [16, -16] | ||
truncate: false | ||
map: "" |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
structures: | ||
- name: cross | ||
structure: | ||
structures: | ||
- name: beam | ||
structure: | ||
palette: | ||
't': true | ||
'f': false | ||
map: | | ||
ttt | ||
ttt | ||
ttt | ||
ttt | ||
ttt | ||
ttt | ||
fff | ||
fff | ||
fff | ||
placements: | ||
- src: beam | ||
offset: [0, 3] | ||
truncate: false | ||
- src: beam | ||
offset: [-3, -3] | ||
truncate: false | ||
orient: | ||
up: east | ||
map: "" | ||
- name: disc | ||
structure: | ||
mask: '.' | ||
palette: | ||
't': true | ||
map: | | ||
..tttt.. | ||
.tttttt. | ||
ttt..ttt | ||
tt....tt | ||
tt....tt | ||
ttt..ttt | ||
.tttttt. | ||
..tttt.. | ||
placements: | ||
- src: cross | ||
offset: [0, -15] | ||
truncate: false | ||
- src: cross | ||
offset: [0, 0] | ||
truncate: false | ||
orient: | ||
up: east | ||
- src: cross | ||
offset: [15, 0] | ||
truncate: false | ||
orient: | ||
up: south | ||
- src: cross | ||
offset: [15, -15] | ||
truncate: false | ||
orient: | ||
up: west | ||
- src: disc | ||
offset: [8, -8] | ||
truncate: false | ||
map: "" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -xe | ||
|
||
# Run this locally before pushing a branch to save some CI cycles | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
cd $SCRIPT_DIR/../.. | ||
|
||
scripts/normalize/cabal.sh | ||
scripts/normalize/code-format.sh | ||
scripts/normalize/yaml.sh | ||
hlint . |
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
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.