From 29a1d98277ecb2ceea0b5c8fc66fa8930a4085f9 Mon Sep 17 00:00:00 2001 From: Victor Blomqvist Date: Mon, 2 Jan 2023 11:21:09 +0100 Subject: [PATCH] Do not use infinite loop in readme example #223 --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 1c7d5afb..49f39fee 100644 --- a/README.rst +++ b/README.rst @@ -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::