adds missing do statement after for loops

This commit is contained in:
Michael Nix 2018-02-18 22:42:52 +01:00 committed by GitHub
parent dca0947077
commit 4ffbcea89c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ You can iterate over the shapes using ``pairs`` (see example).
**Example**:: **Example**::
local collisions = HC.collisions(shape) local collisions = HC.collisions(shape)
for other, separating_vector in pairs(collisions) for other, separating_vector in pairs(collisions) do
shape:move(-separating_vector.x/2, -separating_vector.y/2) shape:move(-separating_vector.x/2, -separating_vector.y/2)
other:move( separating_vector.x/2, separating_vector.y/2) other:move( separating_vector.x/2, separating_vector.y/2)
end end
@ -237,7 +237,7 @@ You can iterate over the shapes using ``pairs`` (see example).
**Example**:: **Example**::
local candidates = HC.neighbors(shape) local candidates = HC.neighbors(shape)
for other in pairs(candidates) for other in pairs(candidates) do
local collides, dx, dy = shape:collidesWith(other) local collides, dx, dy = shape:collidesWith(other)
if collides then if collides then
other:move(dx, dy) other:move(dx, dy)