Giter Club home page Giter Club logo

dice-mc's Introduction

dice-mc

    _/_/_/    _/_/_/   _/_/_/  _/_/_/            _/      _/     _/_/_/   
   _/    _/    _/   _/        _/                _/_/  _/_/   _/        
  _/    _/    _/   _/        _/_/_/   _/_/_/   _/  _/  _/   _/         
 _/    _/    _/   _/        _/                _/      _/   _/          
_/_/_/_/  _/_/_/   _/_/_/  _/_/_/            _/      _/     _/_/_/     

Rolls dice in the form of "1d20 + 1d4 - 2d6 x3". Works up to a "dice character" width of 5 characters: 1d100, 20d99, 100d2. Sensitive to white space between the dice and operators.

The above example rolls 1d20, adds 1d4, subtracts 2d6, and then repeats that 3 times, reporting the results in a gloriously unformatted manner:

 Input >
1d20 + 1d4 - 2d6 x3
 1d20           13 total=          13
 1d4             3 total=           3
 2d6             4           6 total=          10
 ----------------------------------------
 Total for roll           1 is           6
 ----------------------------------------
 1d20            1 total=           1
 1d4             2 total=           2
 2d6             6           5 total=          11
 ----------------------------------------
 Total for roll           2 is          -8
 ----------------------------------------
 1d20           19 total=          19
 1d4             1 total=           1
 2d6             3           6 total=           9
 ----------------------------------------
 Total for roll           3 is          11
 ----------------------------------------

 Total of all           3 rolls is           9

Calling this a monte carlo dice roller is probably a stretch, but it does use random numbers (shocking, I know).

Compile with gfortran. Help text available with input of h, H, or help. Quit by unplugging your desktop, with ctrl-c, or with input of q or Q

Contains undocumented "secret functionality" in the "secret-functions" branch. Main branch will always roll dice fair with no secret inputs.

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.