-
Notifications
You must be signed in to change notification settings - Fork 2
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
15 changed files
with
80 additions
and
80 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
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
12 changes: 6 additions & 6 deletions
12
shepherd/tests/examples/example_outdated/example_outdated.shepherd
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
READ LCM_TARGETS.SHEPHERD | ||
READ YDL_TARGETS.SHEPHERD | ||
RUN started = False | ||
RUN names = [] | ||
RUN ids = [] | ||
WHILE not started | ||
WAIT SHEPHERD_HEADERS.PLAYER_JOINED FROM LCM_TARGETS.SHEPHERD WITH name = 'name' WITH id = 'id' OR SHEPHERD_HEADERS.NEXT_STAGE FROM LCM_TARGETS.SHEPHERD SET started = True | ||
WAIT SHEPHERD_HEADERS.PLAYER_JOINED FROM YDL_TARGETS.SHEPHERD WITH name = 'name' WITH id = 'id' OR SHEPHERD_HEADERS.NEXT_STAGE FROM YDL_TARGETS.SHEPHERD SET started = True | ||
RUN names.append(name) | ||
RUN ids.append(id) | ||
EMIT SERVER_HEADERS.PLAYERS TO LCM_TARGETS.SERVER WITH 'usernames' = names WITH 'recipients' = ids | ||
EMIT SERVER_HEADERS.PLAYERS TO YDL_TARGETS.SERVER WITH 'usernames' = names WITH 'recipients' = ids | ||
IF len(names) < 5 and started | ||
RUN started = False | ||
RUN num_players = len(names) | ||
EMIT SERVER_HEADERS.NOT_ENOUGH_PLAYERS TO LCM_TARGETS.SERVER WITH 'players' = num_players | ||
EMIT SERVER_HEADERS.NOT_ENOUGH_PLAYERS TO YDL_TARGETS.SERVER WITH 'players' = num_players | ||
END | ||
END | ||
EMIT SERVER_HEADERS.CHANCELLOR_REQUEST TO LCM_TARGETS.SERVER WITH 'president' = names[0] WITH 'ineligibles' = [] | ||
EMIT SERVER_HEADERS.CHANCELLOR_REQUEST TO YDL_TARGETS.SERVER WITH 'president' = names[0] WITH 'ineligibles' = [] | ||
ASSERT len(names) >= 5 | ||
|
||
WAIT SHEPHERD_HEADER.START_NEXT_STAGE FROM LCM_TARGETS.SHEPHERD OR SHEPHERD_HEADER.RESET_CURRENT_STAGE FROM LCM_TARGETS.SHEPHERD AND SHEPHERD_HEADER.RESET_MATCH FROM LCM_TARGETS.SHEPHERD | ||
WAIT SHEPHERD_HEADER.START_NEXT_STAGE FROM YDL_TARGETS.SHEPHERD OR SHEPHERD_HEADER.RESET_CURRENT_STAGE FROM YDL_TARGETS.SHEPHERD AND SHEPHERD_HEADER.RESET_MATCH FROM YDL_TARGETS.SHEPHERD |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
READ LCM_TARGETS.SHEPHERD | ||
READ YDL_TARGETS.SHEPHERD | ||
RUN SETUP = 'setup' | ||
RUN AUTO = 'auto' | ||
RUN stage = SETUP | ||
WHILE stage == SETUP | ||
WAIT SHEPHERD_HEADER.START_NEXT_STAGE FROM LCM_TARGETS.SHEPHERD SET stage = AUTO OR SHEPHERD_HEADER.SETUP_MATCH FROM LCM_TARGETS.SHEPHERD WITH b1_name = 'b1name' WITH b1_num = 'b1num' | ||
WAIT SHEPHERD_HEADER.START_NEXT_STAGE FROM YDL_TARGETS.SHEPHERD SET stage = AUTO OR SHEPHERD_HEADER.SETUP_MATCH FROM YDL_TARGETS.SHEPHERD WITH b1_name = 'b1name' WITH b1_num = 'b1num' | ||
PRINTP stage | ||
END | ||
PRINT entering autonomous | ||
RUN from Utils import * | ||
EMIT SCOREBOARD_HEADER.STAGE_TIMER_START TO LCM_TARGETS.SCOREBOARD WITH 'time' = CONSTANTS.AUTO_TIME | ||
EMIT SCOREBOARD_HEADER.STAGE_TIMER_START TO LCM_TARGETS.SCOREBOARD WITH 'time' = CONSTANTS.AUTO_TIME | ||
EMIT SCOREBOARD_HEADER.STAGE TO LCM_TARGETS.SCOREBOARD WITH 'stage' = AUTO | ||
EMIT SCOREBOARD_HEADER.STAGE TO LCM_TARGETS.SCOREBOARD WITH 'stage' = AUTO | ||
RUN from utils import * | ||
EMIT UI_HEADER.SCORES TO YDL_TARGETS.UI WITH 'blue_score' = 0 WITH 'gold_score' = 0 | ||
EMIT UI_HEADER.SCORES TO YDL_TARGETS.UI WITH 'blue_score' = 0 WITH 'gold_score' = 0 | ||
EMIT UI_HEADER.STATE TO YDL_TARGETS.UI WITH 'stage' = AUTO | ||
EMIT UI_HEADER.STATE TO YDL_TARGETS.UI WITH 'stage' = AUTO | ||
PASS |
Oops, something went wrong.