keyboard.update() main_surface.fill([255, 255, 255]) if keyboard.exit: running = False if K_LSHIFT in keyboard.pressed_keys: test_ship.change_throttle_by(1/90) if K_LCTRL in keyboard.pressed_keys: test_ship.change_throttle_by(-1/90) if K_x in keyboard.pressed_keys: test_ship.set_throttle_to(0) if K_z in keyboard.pressed_keys: test_ship.set_throttle_to(1) if K_s in keyboard.pressed_keys: test_ship.change_bearing_by(1) if K_a in keyboard.pressed_keys: test_ship.change_bearing_by(-1) if test_ship.throttle > 0: test_ship.create_exhaust() for particle in ExhaustParticle.all_particles: particle.move() main_surface.blit(particle.texture, (particle.x, particle.y)) test_ship.move() test_ship.use_fuel() stats.update() # test_ship.texture has to blitted because of complications with objects. main_surface.blit(test_ship.texture, (test_ship.get_centre_x(), test_ship.get_centre_y()))