Dev changes (#5)
* Fixed dependency * Updates to NeoDictionary * Changes to NeoDictionary * Started working on a Git implementation to integrate into Game Engines in the future * Added commit functionality to the git library * New changes * Added select for NeoDictionary.cs * Fixed issue with previous new method * Added a Benchmarking Tool to be used mostly in game engines * Added IndexOf to NeoDictionary.cs * Added new method for BenchmarkUtility.cs * added an instacedobject class * Added a new shuffle method for lists * fixed return type * Added new Changelog generator * Added new Game logic library to assist with game projects * Added Web Project * Added Nuget package configs * Add workflow for publishing game library NuGet package * Add README for OmegaLeo's Helper Library * Updated Website to reflect all libraries * Fixed missing library in Changelog * Added Contributing and Code of Conduct * Fixed web project * new documentation changes * fix packages * Fixed DocumentationHelper package dependencies * Added Serilog * Added logging * Fixed documentation * Added logging for cache * fixed documentation * Updated README.md * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix error --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit was merged in pull request #5.
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using NetFlow.DocumentationHelper.Library.Attributes;
|
||||
using OmegaLeo.HelperLib.Game.Models;
|
||||
|
||||
namespace OmegaLeo.HelperLib.Game.Extensions
|
||||
{
|
||||
public static class ListExtensions
|
||||
{
|
||||
[Documentation(nameof(Shuffle),
|
||||
"Shuffles the elements of the list in place using the provided RandomNumberGenerator.",
|
||||
null,
|
||||
@"```csharp
|
||||
var list = new List<int> { 1, 2, 3, 4};
|
||||
var rng = new RandomNumberGenerator();
|
||||
// List before: [1, 2, 3, 4]
|
||||
list.Shuffle(rng);
|
||||
// List after: [3, 1, 4, 2] (example output)
|
||||
```")]
|
||||
public static void Shuffle<T>(this IList<T> list, RandomNumberGenerator rng)
|
||||
{
|
||||
for (int i = list.Count - 1; i > 0; i--)
|
||||
|
||||
Reference in New Issue
Block a user