Skip to content

Commit

Permalink
Fix roads
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Aug 25, 2024
1 parent d458be5 commit 126b51c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 33 deletions.
4 changes: 2 additions & 2 deletions data/scenarios/Challenges/_pied-piper/rat.sw
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def moveUntilBlocked =
def pauseAtRandom =
r <- random 3;
if (r == 0) {
r2 <- random 8;
wait $ 4 + r2;
r2 <- random 12;
wait $ 6 + r2;
} {}
end;

Expand Down
8 changes: 8 additions & 0 deletions data/scenarios/Challenges/_pied-piper/solution.sw
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def go =
place "tree";
move; move;
// place "oats";
end;

wait 10;
go;
46 changes: 15 additions & 31 deletions data/scenarios/Challenges/pied-piper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ terrains:
Wooden raised path
robots:
- name: base
loc: [18, -22]
dir: north
devices:
- 3D printer
Expand All @@ -35,6 +36,9 @@ robots:
- strange loop
- string
- workbench
inventory:
- [50, oats]
- [50, tree]
- name: rat
system: true
dir: west
Expand All @@ -46,18 +50,18 @@ robots:
program: |
run "scenarios/Challenges/_pied-piper/rat.sw"
- name: helper
loc: [0, 0]
loc: [0, 10]
system: true
dir: west
display:
invisible: false
devices:
- logger
program: |
teleport base (12, -13);
noop;
objectives:
- goal:
- Rats have infested the dwellings. Clear them out!
- Rats have infested the village dwellings. Clear them out!
condition: |
try {
r <- robotNamed "rat";
Expand Down Expand Up @@ -101,29 +105,9 @@ world:
x........x
x........x
xxxxxxxxxx
- name: road
structure:
palette:
's': [stone]
map: |
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
ssss
- name: street pair
structure:
placements:
- src: road
offset: [0, 0]
- src: house
offset: [-11, 0]
orient:
Expand All @@ -137,36 +121,36 @@ world:
structure:
placements:
- src: street pair
offset: [0, 2]
offset: [0, 0]
orient:
flip: true
- src: street pair
offset: [0, 4]
offset: [0, 9]
map: ""
palette:
'Ω': [grass, erase, base]
'.': [grass]
'b': [bridge, erase]
placements:
- src: block
offset: [-7, -11]
offset: [-7, -6]
- src: block
offset: [-7, -29]
offset: [-7, -24]
orient:
up: east
- src: block
offset: [23, -29]
offset: [23, -24]
orient:
up: east
upperleft: [0, 7]
upperleft: [0, 2]
dsl: |
overlay
[ {grass}
, mask (y > -2 && y < 2) {water}
, mask (x > 17 && x < 22) {stone}
, mask (y > -37 && y < -32) {stone}
]
map: |
Ω...bbbb..
....bbbb..
....bbbb..
....bbbb..
....bbbb..
Expand Down

0 comments on commit 126b51c

Please sign in to comment.