Main function of the game, creates the settings, menu and game objects and runs main functions of them in the loop