AdvancedDiceAndCoins 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AdvancedDiceAndCoins --version 1.0.0                
NuGet\Install-Package AdvancedDiceAndCoins -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AdvancedDiceAndCoins" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AdvancedDiceAndCoins --version 1.0.0                
#r "nuget: AdvancedDiceAndCoins, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AdvancedDiceAndCoins as a Cake Addin
#addin nuget:?package=AdvancedDiceAndCoins&version=1.0.0

// Install AdvancedDiceAndCoins as a Cake Tool
#tool nuget:?package=AdvancedDiceAndCoins&version=1.0.0                

AdvancedDiceAndCoins

Proudly* presenting my first package, designed for simulating all kinds of dice rolls. My friends and family have told me it’s great! Give it a roll! (sorry) Your feedback is welcome.

Usage/Examples

using AdvancedDiceAndCoins;

int attack = Roll.D20;

Dice longswordDamage = new("D8+2");
longswordDamage.Roll();
int forgotToSaveTheResultNoWorries = longswordDamage.LastRoll;

DiceSet redDragonBreath = new("18D6");
int playerHP = 23;
playerHP -= redDragonBreath.Roll();

Dice rerollOneOnD6 = new(2, 6, 0); //smallestNumber, largestNumber, modifier

DiceSet mixedDice = new();
mixedDice.Add(new Dice("D8+3")); //D8+3
mixedDice.Add(new Dice(10, 1)); //D10+1
mixedDice.Add(new Dice(1, 12, 6)); //D12+6
mixedDice.Add(new Dice(4)); //D4
mixedDice.Add(new Dice(10, 100, 0)); //D100 but smallest roll is 10

Dice a = new(6); //d6 same as => Dice a = new("D6");
Dice b = new(6);
int result = a + b;
int resultSub = a - b;
if (a > b)
{
    Console.WriteLine("*: should be more modest");
}

Coin coin = new();
coin.Flip();
coin.Toss();
Console.WriteLine(coin.NumberOfTails);

bool trueOrFalse = TrueOrFalse.Decide()
string leftOrRight = LeftOrRight.Decide()


Authors

Feedback

If you have any feedback, please reach out at ifigazsisp@gmail.com

License

MIT License

Copyright (c) 2024, Zoltán Kapeller

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.5 139 4/8/2024
1.1.4 114 4/3/2024
1.1.3 119 3/31/2024
1.1.2 125 3/26/2024
1.1.1 122 3/25/2024
1.1.0 138 3/25/2024
1.0.1 136 3/24/2024
1.0.0 123 3/23/2024