{"id":18416979,"url":"https://github.com/rpdevjesco/codewarsthebattleoflists","last_synced_at":"2025-04-13T03:18:41.797Z","repository":{"id":90896661,"uuid":"118862907","full_name":"RPDevJesco/CodeWarsTheBattleOfLists","owner":"RPDevJesco","description":"The code for the video https://www.youtube.com/watch?v=sF0qsYBXeFc\u0026t=5s","archived":false,"fork":false,"pushed_at":"2018-01-25T10:37:18.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-13T03:18:39.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RPDevJesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-25T04:37:42.000Z","updated_at":"2019-09-24T19:44:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6d09f0e-b228-4352-8d7a-2d5229c72d19","html_url":"https://github.com/RPDevJesco/CodeWarsTheBattleOfLists","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FCodeWarsTheBattleOfLists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FCodeWarsTheBattleOfLists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FCodeWarsTheBattleOfLists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FCodeWarsTheBattleOfLists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RPDevJesco","download_url":"https://codeload.github.com/RPDevJesco/CodeWarsTheBattleOfLists/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657935,"owners_count":21140852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:07:50.995Z","updated_at":"2025-04-13T03:18:41.767Z","avatar_url":"https://github.com/RPDevJesco.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeWarsTheBattleOfLists\nThe code for the video https://www.youtube.com/watch?v=sF0qsYBXeFc\u0026amp;t=5s\n\n\nIn order to get this code to work with Unity3D, there is a slight change you need to make for the Lists.\n\nThis is how your shuffledResults class should look.\n\nusing System.Linq;\n\npublic class ShuffledResultClass\n{\n\n    public List\u003cGameObject\u003e ShuffledResults(List\u003cGameObject\u003e main, List\u003cGameObject\u003e secondary)\n    {\n    \n        GameObject[] arr = main.ToArray();\n        TheShuffleClass.Shuffle(arr);\n        var converted = arr.Distinct().ToList();\n    \n        foreach (var item in converted)\n            secondary.Add(item);\n            \n        return secondary;\n    }\n}\n\nThen for the class that implements Monobehavior, it should look something like this for the basics...\n\n\npublic class MonoBehaviorScripting : MonoBehaviour\n{\n\n    public List\u003cGameObject\u003e main;\n    List\u003cGameObject\u003e secondary;\n    \n    void Start ()\n    {\n        secondary = new List\u003cGameObject\u003e();\n        ShuffledResultClass shuff = new ShuffledResultClass();\n        shuff.ShuffledResults(main, secondary);\n        for (int i = 0; i \u003c secondary.Count; i++)\n            Instantiate(secondary[i] as GameObject);\n    }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fcodewarsthebattleoflists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpdevjesco%2Fcodewarsthebattleoflists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fcodewarsthebattleoflists/lists"}