Giter VIP home page Giter VIP logo

dicenotation's Introduction

DiceNotation Build Status

Standard Dice Notation for C/C++.

โš ๏ธ Warning: this library does not work and it has been deprecated in favour of dicenotation-rs which can be used in other languages after version v0.2.0.

Usage

Include the header file for DiceNotation

#include <DiceNotation.h>

You can then use the rollDice(const char*) function to roll a dice.

int result = rollDice("2d10+5") + rollDice("1d6-2");

Advanced Usage

It is possibile to customize the behavior of the library by extending the parser and the roller (see the classes: IDiceRoller IDiceParser)

Building

In order to build the solution cmake >= 3.5 is required. The option BUILD_SHARED_LIBS determines wether a shared (DLL on Windows) or static library is built.

It is also possible to drop the .cpp and .h files alongside your existing source code (be sure to define DICENOTATION_STATIC in your compile options) and configure your build system to include those files.

The library is being tested on the following compilers:

  • Visual C++ 2017
  • GCC
  • Clang

Contributing

You are free to contribute the code to this repository. As soon as the first stable version is reached (0.1) the GitFlow branching model will be adopted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.