Skip to content

Commit

Permalink
improve scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Jan 23, 2024
1 parent 214db8f commit 506bbb2
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
9 changes: 8 additions & 1 deletion data/scenarios/Testing/1598-detect-entity-change.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ author: Karl Ostmo
description: |
Ensure that a change to an entity can be observed
by a system robot within a single tick.
In this scenario, the base will first `swap` the
existing `dial (R)`{=entity} with a `dial (G)`{=entity},
then immediately `swap` again with a `dial (B)`{=entity}.
The system robot should be able to detect the presence
of the `dial (G)`{=entity} before it is `swap`ped a second time.
creative: true
seed: 0
objectives:
Expand Down Expand Up @@ -47,7 +54,7 @@ robots:
inventory:
- [1, flower]
solution: |
wait 8;
wait 2;
move;
move;
swap "dial (G)";
Expand Down
62 changes: 62 additions & 0 deletions data/scenarios/Testing/1598-watch-wait-instant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
version: 1
name: Watch and Wait with Instant
author: Karl Ostmo
description: |
Ensure that the `watch` command does
not introduce a tick delay.
creative: false
seed: 0
objectives:
- teaser: Has item
goal:
- |
Observe item
condition: |
r <- robotnamed "watchbot";
as r {ishere "rock"};
//as r {return false};
robots:
- name: base
dir: [1, 0]
devices:
- hourglass
- fast grabber
- logger
- treads
inventory:
- [1, flower]
- [1, tree]
- [1, rock]
- name: watchbot
system: true
display:
invisible: false
dir: [1, 0]
program: |
def watchAndWait =
watch down;
wait 1000;
watchAndWait;
end;
instant watchAndWait;
inventory:
- [1, flower]
solution: |
move; move;
swap "flower";
swap "tree";
swap "rock";
known: [gold]
world:
dsl: |
{blank}
upperleft: [-1, -1]
offset: false
palette:
'.': [grass, erase]
'B': [grass, erase, base]
'c': [grass, gold, watchbot]
map: |
B.c

0 comments on commit 506bbb2

Please sign in to comment.