Skip to content

Commit 57f933c

Browse files
authored
Rename Win to win in tutorial scenarios (#2554)
Someone at ZuriHac noted that it was inconsistent the way all our entities start with lowercase except the special `Win` entities in a few tutorials, and I think I agree. This PR renames them all to `win`. Closes #2475 .
1 parent 9a75949 commit 57f933c

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

data/scenarios/Tutorials/debug-hint.sw

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def set_said_loc: (Int * Int) -> RobotState -> RobotState
4343
[gave_win = s.gave_win, said_loc = v, said_log_missing = s.said_log_missing]
4444
end
4545

46-
// At the beginning each robot can be given Win.
46+
// At the beginning each robot can be given win.
4747
def defaultState: RobotState =
4848
[gave_win = false, said_loc = (-100, -100), said_log_missing = false]
4949
end
@@ -82,7 +82,7 @@ end
8282
// Running state
8383
myLoc <- whereami;
8484

85-
// Try to give a robot a Win, filtering out those that were already given a Win.
85+
// Try to give a robot a `win`, filtering out those that were already given a `win`.
8686
// The robot will also receive instructions, so it **must have a logger!**
8787
def tryGive: Text -> State -> Cmd State
8888
= \msg. \state.
@@ -108,8 +108,8 @@ def tryGive: Text -> State -> Cmd State
108108
try {
109109
reprogram rob {log msg};
110110
log ("successfully reprogrammed robot " ++ format rob);
111-
give rob "Win";
112-
log ("successfully gave Win to robot " ++ format rob);
111+
give rob "win";
112+
log ("successfully gave win to robot " ++ format rob);
113113
pure (updateList rob (set_gave_win true state) stateAcc)
114114
} {
115115
log ("the robot " ++ format rob ++ "is probably still active!");
@@ -126,10 +126,10 @@ end
126126
log "Hi, I am the system hint robot";
127127
iterate [can_wait=true, list=emptyList] (tryGive
128128
$ "Send a robot to `salvage` me and come back to"
129-
++ " `give base \"Win\"`. When the rescue robot stands"
129+
++ " `give base \"win\"`. When the rescue robot stands"
130130
++ " where I am and executes `salvage`, all my inventory"
131-
++ " and logs will go to it, including the \"Win\". Once you"
132-
++ " have brought the \"Win\" to your base, you will win!\n\n"
131+
++ " and logs will go to it, including the \"win\". Once you"
132+
++ " have brought the \"win\" to your base, you will win!\n\n"
133133
++ "NOTE: if you are still viewing me when I am salvaged,"
134134
++ " you will be in for a surprise! If this happens just"
135135
++ " type `view base` to return to viewing your base."

data/scenarios/Tutorials/debug.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ objectives:
2828
the situation...
2929
condition: |
3030
try {
31-
as base {has "Win"}
31+
as base {has "win"}
3232
} { pure false }
3333
entities:
34-
- name: Win
34+
- name: win
3535
display:
3636
attr: device
3737
char: 'W'
@@ -43,9 +43,9 @@ solution: |
4343
turn east; move; move; move; log "brace for impact"; move
4444
};
4545
salvager <- build {
46-
log "I will bring home the Win!"; // This allows log messages to transfer over
46+
log "I will bring home the win!"; // This allows log messages to transfer over
4747
turn right; turn right; turn right; turn right;
48-
turn east; move; move; move; salvage; turn back; move; move; give base "Win"
48+
turn east; move; move; move; salvage; turn back; move; move; give base "win"
4949
};
5050
robots:
5151
- name: base
@@ -75,7 +75,7 @@ robots:
7575
- dictionary
7676
- 3D printer
7777
inventory:
78-
- [100000, Win]
78+
- [100000, win]
7979
display:
8080
invisible: true
8181
system: true

data/scenarios/Tutorials/type-errors.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ objectives:
1717
- |
1818
`move move`{=snippet}
1919
- The last expression might give the most confusing error. Obviously we are just missing a `;`{=snippet} separating the two `move` commands. However, without the semicolon, it looks like `move` is a function being applied to an argument, but of course `move` is not a function.
20-
- Once you are done experimenting, execute `place "Win"` to finish this challenge and move on to the next.
20+
- Once you are done experimenting, execute `place "win"` to finish this challenge and move on to the next.
2121
condition: |
2222
try {
23-
w <- as base {has "Win"};
23+
w <- as base {has "win"};
2424
pure (not w);
2525
} { pure false }
2626
entities:
27-
- name: Win
27+
- name: win
2828
display:
2929
attr: device
3030
char: 'W'
3131
description:
32-
- Do `place "Win"` once you are done with this challenge.
32+
- Do `place "win"` once you are done with this challenge.
3333
properties: [known, pickable]
3434
solution: |
35-
place "Win"
35+
place "win"
3636
robots:
3737
- name: base
3838
dir: east
@@ -42,7 +42,7 @@ robots:
4242
- logger
4343
- grabber
4444
inventory:
45-
- [1, Win]
45+
- [1, win]
4646
world:
4747
palette:
4848
'>': [grass, null, base]

data/scenarios/Tutorials/types.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ objectives:
2121
`3`
2222
- |
2323
`"tree"`
24-
- Once you are done experimenting, execute `place "Win"` to finish this challenge and move on to the next.
24+
- Once you are done experimenting, execute `place "win"` to finish this challenge and move on to the next.
2525
condition: |
2626
try {
27-
w <- as base {has "Win"};
27+
w <- as base {has "win"};
2828
pure (not w);
2929
} { pure false }
3030
entities:
31-
- name: Win
31+
- name: win
3232
display:
3333
attr: device
3434
char: 'W'
3535
description:
36-
- Do `place "Win"` once you are done with this challenge.
36+
- Do `place "win"` once you are done with this challenge.
3737
properties: [known, pickable]
3838
solution: |
39-
place "Win"
39+
place "win"
4040
robots:
4141
- name: base
4242
dir: east
@@ -46,7 +46,7 @@ robots:
4646
- logger
4747
- grabber
4848
inventory:
49-
- [1, Win]
49+
- [1, win]
5050
world:
5151
palette:
5252
'>': [grass, null, base]

0 commit comments

Comments
 (0)