<s> import sys <EOL> import random <EOL> import math <EOL> from pyglet import window <EOL> from pyglet import clock <EOL> from pyglet import resource <EOL> import spryte <EOL> NUM_CARS = <NUM_LIT:100> <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> NUM_CARS = int ( sys . argv [ <NUM_LIT:1> ] ) <EOL> win = window . Window ( vsync = False ) <EOL> fps = clock . ClockDisplay ( color = ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> cars = spryte . SpriteBatch ( ) <EOL> car = resource . image ( '<STR_LIT>' ) <EOL> car . anchor_x = <NUM_LIT:16> <EOL> car . anchor_y = <NUM_LIT:20> <EOL> for i in range ( NUM_CARS ) : <EOL> s = spryte . Sprite ( car , <EOL> win . width * random . random ( ) , win . height * random . random ( ) , <EOL> batch = cars , dr = - <NUM_LIT> + random . random ( ) * <NUM_LIT> ) <EOL> while not win . has_exit : <EOL> win . dispatch_events ( ) <EOL> clock . tick ( ) <EOL> win . clear ( ) <EOL> for car in cars : <EOL> car . rotation = ( car . rotation + car . dr ) % <NUM_LIT> <EOL> cars . draw ( ) <EOL> fps . draw ( ) <EOL> win . flip ( ) </s>
