diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 17:54:32 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 17:54:32 -0500 |
| commit | 0df908f55fd7f617be35f7fe7a48f2eee1b19d57 (patch) | |
| tree | abe6e7d928f6057b94860e62b2c2a3165eea0a29 /examples/game/world.tm | |
| parent | 145a078387b8bce5e8e3c93c333c030aa7455e4c (diff) | |
Support iterating over pointers to collections again
Diffstat (limited to 'examples/game/world.tm')
| -rw-r--r-- | examples/game/world.tm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/game/world.tm b/examples/game/world.tm index 4df7f156..a28fe987 100644 --- a/examples/game/world.tm +++ b/examples/game/world.tm @@ -57,11 +57,11 @@ struct World(player:@Player, goal:@Box, boxes:@[@Box], dt_accum=0.0, won=no): # Resolve player overlapping with any boxes: for i in 3: - for b in w.boxes[]: + for b in w.boxes: w.player.pos += STIFFNESS * solve_overlap(w.player.pos, Player.SIZE, b.pos, b.size) func draw(w:@World): - for b in w.boxes[]: + for b in w.boxes: b:draw() w.goal:draw() w.player:draw() |
