ouxsoft / luckbydice Goto Github PK
View Code? Open in Web Editor NEWA library for simulating luck based dice rolls from dice notations written in PHP.
License: Apache License 2.0
A library for simulating luck based dice rolls from dice notations written in PHP.
License: Apache License 2.0
A three JS test would be neat to visualize for people who just want to roll dice.
Something similar to:
https://github.com/byWulf/threejs-dice
http://a.teall.info/dice/
But rolls would be based on LuckByDice notation.
The type of luck used should be able to be set, e.g.
$luck->setProfile()
(come up with better name for method)
This would load all the luck info used. There could be different rules. For example, using 30% and 70% for upper and lower boundaries. Or reward -90% with +2 luck and -10% with -2. etc.
The profile should feature method for rules increase and decrease values.
<?php
public function update(float $percent)
{
switch($percent)
case <=10:
$luck = $luck +2;
break;
case <=20:
$luck--;
break;
case >=80:
$luck++;
break;
case >=10:
$luck = $luck + 2
break;
default:
break;
}
It should feature a min and max for luck as well.
private $min;
private $max;
And there should be a method to increase or decrease min and max.
$luck->setMax(int)
$luck->setMin()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.