Commit Graph

3 Commits

Author SHA1 Message Date
hypercross 94a9cc9519 refactor(test): migrate blackjack tests to use TestHelpers
Refactor the blackjack test suite to utilize the centralized
`TestHelpers`
from `OECS.PlayTest` instead of local implementations. This includes:

- Replacing local `SetupGame`, `FindEntity`, and `SnapshotWorld` with
  `TestHelpers` equivalents.
- Moving `PlayLog` logic and round running into the `OECS.PlayTest`
  framework.
- Updating project references to include `OECS.PlayTest`.
2026-07-21 18:09:47 +08:00
hypercross cbb7edd472 refactor: simplify entity lookups and clean up state updates
- Replace manual entity iteration with `world.FindEntity<T>()`
- Remove redundant `MarkModified<GameState>` calls
- Add safety counters to prevent infinite loops in tests and systems
- Call `FlushPendingMutations` after card transfers to ensure
  consistency
- Rename `Run` to `RunImpl` in several systems
2026-07-21 13:57:11 +08:00
hypercross e1fb197474 feat(oecs): improve serialization and add snapshot tests
Enhance the OECS framework to support more robust component
deserialization during world serialization. This includes adding
boxed component support and a runtime fallback for component
discovery.

Additionally, introduces snapshot testing patterns for Blackjack
and TicTacToe to allow for manual verification of world state and
reactivity logs.
2026-07-20 17:05:17 +08:00