#pre move renders m.drawVertex() nav.calculateGaps(rangeData) nav.draw(0,0,m.getPosition(),m.getRotation()) #print nav.getLastMovement() m.updatePosition(nav.getLastMovement()) #post move renders m.drawPosition() #show screen pygame.display.flip() nav.drive() while wait_for_input: for event in pygame.event.get(): if event.type == QUIT: wait_for_input = False running = False if event.type == pygame.KEYDOWN: if event.key == pygame.K_SPACE: wait_for_input = False if event.key == pygame.K_ESCAPE: wait_for_input = False running = False r.cleanup()