Skip to content

Define your own currencies and convert between them with the right factor

License

Notifications You must be signed in to change notification settings

Furinaxi/CurrencySystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CurrencySystem

Define your own currencies and convert between them with the right factor

What does the CurrencySystem do?

The CurrencySystem allows you to define your own currencies and convert between them with the right factor. The same principle is used in World of Warcraft with "Copper", "Silver" and "Gold".

Example

Here is an example on how to use the CurrencySystem.

string[] currencyNames = new string[] { "Copper", "Silver", "Gold" };

int[] conversionFactors = new int[] {100};

Currency currency = new Currency(currencyNames, conversionFactors);

currency.SetBaseCurrencyValue(8353);

string currencyString = currency.ToStringReversed(); // "0 Gold 83 Silver 53 Copper"

Get started

Be sure to use .NET 7.0 or higher.

Clone the repository

git clone https://github.com/ahriixi/currencysystem

Build the project

dotnet build

You're ready to go! Just link the CurrencySystem.dll to your project and you're ready to go.

Documentation

You can find the full documentation here.

Contributing

Know how to make this project better or found a bug? Send a PR!

About

Define your own currencies and convert between them with the right factor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages