Convenient extension methods for C#
C#
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Extensions
MessageDispatcher
Properties
.gitignore
Boar.csproj
Boar.sln
LICENSE
README.md
RandomByWeight.cs
ThreadSafeRandom.cs

README.md

Boar

Convenient classes and extension methods for C#. Especially for Gaming.

IDictionary extentions

  • GetOrDefault(key, defaultValue/getter)
  • GetOrAdd(key, value/getter)
  • GetOrIncrease(key, increment)
  • GetOrDecrease(key, decrement)

int/long extentions

  • Between(min, max)
  • Clamp(min, max)

Random extentions for array

  • Pick([offset], [count])
  • PickN(n)
  • Suffle()

RandomByWeight

Round-table implementation.