@@ -0,0 +1,1485 @@
+#-*- coding:utf-8 -*-%0Aimport pygame%0Afrom pygame.locals import *%0Afrom random import randint%0A %0Aclass Star(object):%0A %0A    def __init__(self, x, y, speed):%0A %0A        self.x = x%0A        self.y = y%0A        self.speed = speed%0A %0Adef run():%0A %0A    pygame.init()%0A    screen = pygame.display.set_mode((640, 480)) #, FULLSCREEN)%0A %0A    stars = %5B%5D%0A %0A    # %DA%B5%D2%BB%D6%A1%D2%BB%D0%A9%0A    for n in xrange(200):%0A %0A        x = float(randint(0, 639))%0A        y = float(randint(0, 479))%0A        speed = float(randint(10, 300))%0A        stars.append( Star(x, y, speed) )%0A %0A    clock = pygame.time.Clock()%0A %0A    white = (255, 255, 255)%0A %0A    while True:%0A %0A        for event in pygame.event.get():%0A            if event.type == QUIT:%0A                return%0A            if event.type == KEYDOWN:%0A                return%0A %0A        # %D2%BB%C2%B5%0A        y = float(randint(0, 479))%0A        speed = float(randint(10, 300))%0A        star = Star(640., y, speed)%0A        stars.append(star)%0A %0A        time_passed = clock.tick(150)%0A        time_passed_seconds = time_passed / 1000.%0A %0A        screen.fill((0, 0, 0))%0A %0A        # %D0%B5%0A        for star in stars:%0A %0A            new_x = star.x - time_passed_seconds * star.speed%0A            pygame.draw.aaline(screen, white, (new_x, star.y), (star.x+1., star.y))%0A%09%09%09#%D2%BB%D8%BC%C4%BC,%D3%B5%C4%B3%C8%A1%D9%B6,%D9%B6%C8%B5%C4%BF%C4%B3%C8%B3,%D9%B6%C8%B6%CC%B5%C4%B3%C8%B6,%CB%BD%D4%B6%D0%A1%0A            star.x = new_x%0A %0A        def on_screen(star):%0A            return star.x %3E 0%0A %0A        # %DC%B3%CB%BB%E6%A3%AC%C9%BE%0A        stars = filter(on_screen, stars)%0A %0A        pygame.display.update()%0A %0Aif __name__ == %22__main__%22:%0A    run()%0A%0A

add pg1.py