-
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.
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 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
51 changes: 51 additions & 0 deletions
51
data/scenarios/Testing/201-require/1664-require-system-robot-children.yaml
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,51 @@ | ||
version: 1 | ||
name: Requirements of system-robot children | ||
description: | | ||
Normally, system robots are not required to possess devices in order to use any particular command. | ||
However, a robot built by a system robot becomes subject to the requirement. | ||
This is a bug. | ||
In this scenario, the child robot cannot be built because the | ||
parent robot ("queenbee") does not possess a "beaglepuss" in its inventory. | ||
objectives: | ||
- condition: | | ||
try { | ||
robotnamed "childbot"; | ||
return true; | ||
} { | ||
return false; | ||
} | ||
solution: | | ||
noop; | ||
robots: | ||
- name: base | ||
dir: [1, 0] | ||
- name: queenbee | ||
dir: [1, 0] | ||
system: true | ||
display: | ||
invisible: false | ||
char: 'Q' | ||
inventory: | ||
- [1, solar panel] | ||
- [0, beaglepuss] | ||
program: | | ||
def createWorker = | ||
build { | ||
setname "childbot"; | ||
appear "B"; | ||
}; | ||
end; | ||
createWorker; | ||
known: [water] | ||
world: | ||
palette: | ||
'.': [grass] | ||
'B': [grass, null, base] | ||
'Q': [grass, null, queenbee] | ||
upperleft: [-1, 1] | ||
map: | | ||
B..Q | ||
.... | ||
.... |
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