Skip to content

Commit

Permalink
Do not use infinite loop in readme example #223
Browse files Browse the repository at this point in the history
  • Loading branch information
viblo committed Jan 2, 2023
1 parent 52bba36 commit 29a1d98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ Quick code example::

print_options = pymunk.SpaceDebugDrawOptions() # For easy printing

while True: # Infinite loop simulation
for _ in range(100): # Run simulation 100 steps in total
space.step(0.02) # Step the simulation one step forward
space.debug_draw(print_options) # Print the state of the simulation
For more detailed and advanced examples, take a look at the included demos.

This will print (to console) the state of the simulation. For more visual,
detailed and advanced examples, take a look at the included demos.
They are included in the pymunk install, in the pymunk.examples subpackage.
They can be run directly. To list the examples::

Expand Down

0 comments on commit 29a1d98

Please sign in to comment.