Created game loop and made main state run.