input: Write a python function to simulate a simple command-based game loop.
  assert game_loop(['play', 'quit']) == ['Welcome to your game!', 'Playing...', 'Welcome to your game!']
  assert game_loop(['quit']) == ['Welcome to your game!']
  assert game_loop(['play', 'play', 'invalid', 'quit']) == ['Welcome to your game!', 'Playing...', 'Welcome to your game!', 'Playing...', 'Welcome to your game!', 'Invalid input.', 'Welcome to your game!']
output: def game_loop(commands):
      responses = []
      for command in commands:
          if command == 'play':
              responses.append('Playing...')
          elif command == 'quit':
              responses.append('Welcome to your game!')
          else:
              responses.append('Invalid input.')
      return responses