docs(course): fix review findings in modules 06–11
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a7a4cb5b2a
commit
673be0067e
@@ -195,6 +195,8 @@ Our `view : GameState → Scene` is exactly this, for a canvas instead of HTML.
|
||||
|
||||
## Exercises
|
||||
|
||||
> **About test names.** The test titles quoted under "Proved by" are the JavaScript ones. The Scala and F# suites test the same things one-to-one, but their titles use each track's vocabulary: "events" instead of "inputs", `None` instead of `null`, `()` instead of `undefined`, `bind`/`choose` instead of `flatMap`/`filterMap`, `IO.map throwingF io` instead of `map(io, throwingF)`, and so on. Failing tests are reported by name when you run the module's tests; to read all titles, open `scala/test/M06View.test.scala` or `fsharp/tests/M06View.fs`. Fixture-based tests have the same case names in every track.
|
||||
|
||||
### Exercise 6.1 — `view`
|
||||
|
||||
Implement `view` so that it returns the scene described in [The specification of the scene](#the-specification-of-the-scene).
|
||||
@@ -217,9 +219,9 @@ object View:
|
||||
**F#** (`fsharp/src/View.fs`)
|
||||
|
||||
```fsharp
|
||||
module View =
|
||||
let CELL = 20
|
||||
let view (state: GameState) : Scene = failwith "TODO m06"
|
||||
// module Snake.View
|
||||
let CELL = 20
|
||||
let view (state: GameState) : Scene = failwith "TODO m06"
|
||||
```
|
||||
|
||||
**Proved by:** `fixtures/m06-view.json` (cases `playing-with-apple`, `playing-without-apple-has-no-apple-rect`, `paused-overlay`, `game-over-overlay-on-20x20-board`, `won-overlay`) and a test that `CELL` is 20.
|
||||
|
||||
Reference in New Issue
Block a user