parameters: (ctx, spec_name=None)
return_statement: return unique_list
docstring: Get and game projects defined for the spec.  Will strip out duplicate entries
docstring_summary: Get and game projects defined for the spec.  Will strip out duplicate entries
docstring_tokens: Get and game projects defined for the spec . Will strip out duplicate entries
function: def spec_game_projects(ctx, spec_name=None):
      """
      Get and game projects defined for the spec.  Will strip out duplicate entries
      """
      project_settings_map = ctx.get_project_settings_map()
  
      game_projects = _spec_entry(ctx, 'game_projects', spec_name)
      if game_projects is None:
          return []
      unique_list = list()
      for game_project in game_projects:
          if game_project in project_settings_map:
              append_to_unique_list(unique_list, game_project)
  
      # Check if this spec has any game->folder map
      global GAME_FOLDER_MAP
      spec_game_folder_map_list = _spec_entry(ctx, 'game_folders', spec_name)
      if spec_game_folder_map_list and len(spec_game_folder_map_list) > 0:
          # If there is an override game folder map in the spec, then validate its uniqueness and add it to the map
          spec_game_folder_map = spec_game_folder_map_list[0]
          for game_name, game_folder in list(spec_game_folder_map.items()):
              if game_name in GAME_FOLDER_MAP:
                  current_game_folder = GAME_FOLDER_MAP[game_name]
                  if current_game_folder != game_folder:
                      raise Errors.WafError('Conflicting game name to folder map detected in spec {}'.format(spec_name))
              else:
                  GAME_FOLDER_MAP[game_name] = game_folder
  
      return unique_list
function_tokens: def spec_game_projects ( ctx , spec_name = None ) : project_settings_map = ctx . get_project_settings_map ( ) game_projects = _spec_entry ( ctx , 'game_projects' , spec_name ) if game_projects is None : return [ ] unique_list = list ( ) for game_project in game_projects : if game_project in project_settings_map : append_to_unique_list ( unique_list , game_project ) # Check if this spec has any game->folder map global GAME_FOLDER_MAP spec_game_folder_map_list = _spec_entry ( ctx , 'game_folders' , spec_name ) if spec_game_folder_map_list and len ( spec_game_folder_map_list ) > 0 : # If there is an override game folder map in the spec, then validate its uniqueness and add it to the map spec_game_folder_map = spec_game_folder_map_list [ 0 ] for game_name , game_folder in list ( spec_game_folder_map . items ( ) ) : if game_name in GAME_FOLDER_MAP : current_game_folder = GAME_FOLDER_MAP [ game_name ] if current_game_folder != game_folder : raise Errors . WafError ( 'Conflicting game name to folder map detected in spec {}' . format ( spec_name ) ) else : GAME_FOLDER_MAP [ game_name ] = game_folder return unique_list