plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
47db75b
— Peter John
2026-11-16T14:26:45+05:30
docs/plans: rules without Meets
docs/plans/2026-11-13-std-game-review.md
CHANGED
|
@@ -41,3 +41,4 @@ Events stay the only source of truth; std keeps held state as a pure fold of the
|
|
|
41
41
|
|
|
42
42
|
## Rules (user 2026-11-16: "Yes", before the benchmark)
|
|
43
43
|
Objects decide their own collisions (option A): `Meets<Other, A>` with `meets(self, other) -> Option<A>` on Orb (Caught(orb: id)) and Mine (Hit); `rules(self) -> List<A>` collects `..xs.filterMap(|x| x.meets(self.ship))`; `update` handles `Caught`; a counter-based `Random.at(seed:, tick:, salt:)` replaces threading `rng` (no Rolled/Caught accumulators, `deal` a plain map); `touches` in std from declared circle shapes; `Place` as a `Vec2` where that removes conversions. Option B (std contact search) not chosen.
|
|
44
|
+
- Revised (user 2026-11-16): no `Meets` trait; the screen's `rules` is a plain list literal: `..self.orbs.filter(|o| self.ship.touches(o)).map(|o| Caught(orb: o.id))` and `if self.ship.hurt <= 0.0 && self.mines.any(|m| self.ship.touches(m)) then Hit`.
|