-
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.
Add solution for world101 tutorial (#1498)
Closes #1450. ## Demo scripts/play.sh -i data/scenarios/Tutorials/world101.yaml --autoplay
- Loading branch information
Showing
3 changed files
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
def tB = turn back end | ||
def tR = turn right end | ||
def tL = turn left end | ||
|
||
def m = move end | ||
def m2 = m;m end | ||
def m4 = m2;m2 end | ||
def m8 = m4;m4 end | ||
def m9 = m8;m end | ||
def m10 = m8;m2 end | ||
|
||
def mg = m; grab end | ||
|
||
def get_3_trees : cmd unit = | ||
tB; m; mg; mg; mg; tB; m4 | ||
end | ||
|
||
def make_harvester : cmd unit = | ||
make "log"; make "log"; make "log"; | ||
make "board"; make "board"; make "board"; | ||
make "box"; | ||
make "wooden gear"; make "wooden gear"; | ||
make "harvester" | ||
end | ||
|
||
def get_lambda : cmd unit = | ||
m10; tR; m9; harvest; tB; m9; tL; m10 | ||
end | ||
|
||
def solution : cmd unit = | ||
build {get_3_trees}; wait 16; salvage; | ||
make_harvester; | ||
build {get_lambda}; wait 50; salvage | ||
end; | ||
|
||
solution |
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