MCPcopy Create free account
hub / github.com/ActiveState/code / build_boids

Function build_boids

recipes/Python/502216_Boids_Demonstration/recipe-502216.py:79–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 boid.velocity /= boid.velocity.mag() / SPEED_LIMIT
78
79def build_boids():
80 # Create boids variable.
81 global boids
82 boids = tuple(Boid(WIDTH, HEIGHT, OFFSET_START) for boid in xrange(BOIDS))
83
84################################################################################
85

Callers 1

initialiseFunction · 0.70

Calls 2

xrangeClass · 0.85
BoidClass · 0.70

Tested by

no test coverage detected