{"id":17172157,"url":"https://github.com/apmem/faterandom","last_synced_at":"2025-03-24T19:44:56.691Z","repository":{"id":141411821,"uuid":"330447752","full_name":"ApmeM/FateRandom","owner":"ApmeM","description":"Different extensions to random number generators","archived":false,"fork":false,"pushed_at":"2024-06-16T07:22:05.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T00:28:29.091Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApmeM.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":"2021-01-17T17:31:27.000Z","updated_at":"2024-06-16T07:21:53.000Z","dependencies_parsed_at":"2025-01-30T00:37:05.944Z","dependency_job_id":null,"html_url":"https://github.com/ApmeM/FateRandom","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"ApmeM-Archived/PluginTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2FFateRandom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2FFateRandom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2FFateRandom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2FFateRandom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApmeM","download_url":"https://codeload.github.com/ApmeM/FateRandom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343492,"owners_count":20599856,"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-10-14T23:36:16.485Z","updated_at":"2025-03-24T19:44:56.660Z","avatar_url":"https://github.com/ApmeM.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"FateRandom\n==========\nFateRandom is wrappers and extensions for random number generator.\n\nMain class `Fate` and its interface for mocks and injections `IFate` have the following list of methods:\n\n-  float NextFloat()\n-  float NextFloat(float max)\n-  int NextInt(int max)\n-  float NextAngle()\n-  int Range(int min, int max)\n-  float Range(float min, float max)\n-  double Range(double min, double max)\n-  bool Chance(float percent)\n-  bool Chance(int value)\n-  T Choose\u003cT\u003e(T first, T second)\n-  T Choose\u003cT\u003e(T first, T second, T third)\n-  T Choose\u003cT\u003e(T first, T second, T third, T fourth)\n-  T Choose\u003cT\u003e(params T[] list)\n-  T Choose\u003cT\u003e(IList\u003cT\u003e list)\n-  string GenerateString(int size = 38)\n-  void Shuffle\u003cT\u003e(IList\u003cT\u003e list)\n-  void RandomItems\u003cT\u003e(IList\u003cT\u003e source, List\u003cT\u003e destination, int itemCount)\n\nTo make results more predictable for tests it has a few different random number generations:\n- DefaultRandomGenerator - Uses System.Random underneath\n- KnownDataRandomGenerator - Initialized with array of values that is returned in a sequence\n- PregeneratedRandomGenerator - Something in the middle of the above - a predefined amount of numbers generated by System.Random and stored in memory. This one can be used to save current state of random number generator, so it will generate the same sequence after load.\n\nCredits\n==========\n\n- [**Nez**](https://github.com/prime31/Nez) - ![GitHub stars](https://img.shields.io/github/stars/prime31/Nez.svg) - 2D game engine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapmem%2Ffaterandom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapmem%2Ffaterandom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapmem%2Ffaterandom/lists"}