refactor: replace QueryBuilder with generic Query and Select iterators
Replace the old `QueryBuilder` and `ForEach` callback pattern with a more performant, zero-allocation `Select` API using `ref struct` iterators. This change also updates the singleton implementation to use dedicated entities per component type rather than a single reserved entity. - Replace `QueryBuilder`/`QueryDescriptor` with generic `Query<T1..T6>` - Replace `ForEach` callbacks with `world.Select<T1..T6>()` iterators - Replace `EntityIterator` with `WorldQueryExtensions` - Update singleton logic to allocate one entity per component type - Add `FindEntity<T>` and `FindEntities<T>` lookup methods
This commit is contained in:
@@ -58,7 +58,7 @@ public void PlaceBet_AdvancesToDealing()
|
||||
|
||||
Common test helpers:
|
||||
- `SetupGame(seed?)` — create world, register systems, set initial singletons.
|
||||
- `FindEntity<T>(world)` — find first non-singleton entity with component T.
|
||||
- `FindEntity<T>(world)` — find first entity with component T (singletons are automatically excluded by query results).
|
||||
- `CountCardsInHand(world, handEntity)` or `GetHandCards(world, handEntity)`.
|
||||
|
||||
Always keep helpers in the test class (or a shared base) rather than in the
|
||||
|
||||
Reference in New Issue
Block a user