20 lines
1.2 KiB
Markdown
20 lines
1.2 KiB
Markdown
# Module 1 Expansion Drop: playing a card from hand
|
|
|
|
The lesson's [Expansion Drop](../lesson.md#expansion-drop) beat explains the task. This file holds the scenario, the test locations and the check.
|
|
|
|
- Tests: `tests/rust/test_01x.rs` and `tests/ts/test_01x.test.ts`. Copy the one for your track into your workspace's `tests/`.
|
|
- Reference answer: `solution/rust/src/harness.rs` and `solution/ts/src/harness.ts`. Each is the Module 1 reference harness with `play` filled in. Nothing under `src/engine/` changes.
|
|
- Check: commit your workspace before you start, then run `node tools/expansion-check.mjs <your-workspace> <that-commit>` from the course repository. It fails if any file under `src/engine/` changed.
|
|
|
|
## Scenario
|
|
|
|
### test_01x_play_assigns_order_on_entry
|
|
|
|
- Setup: an empty game (`newGame()`, or `new_game(GameOpts::default())` in Rust).
|
|
- Action: add a `Test Filler` to player 0's hand (id H). Then summon a `Test Filler` for player 0 (id S). Then `play(H)`.
|
|
- Assertions:
|
|
- `zoneOf(H)` is board.
|
|
- `hand(0)` is empty.
|
|
- `board(0)` is `[S, H]`: a played card goes to the right end of the board.
|
|
- `orderOfPlay(H) > orderOfPlay(S)`. H was created before S, but S entered play first.
|