ouxsoft/luckbydice
Composer 安装命令:
composer require ouxsoft/luckbydice
包简介
A library for simulating dice rolls written in PHP.
README 文档
README
Got Dice?
Run your dice notation using Docker:
$ docker run ouxsoft/luckbydice:latest bin/luckbydice d3,4d6+1,5d+1*2
Installation
Install using Composer:
$ composer require ouxsoft/luckbydice
Basic Usage
<?php use Ouxsoft\LuckByDice\Factory\TurnFactory; $turn = TurnFactory::getInstance(); $turn->setNotation('10d10,1d6+3*7,d%'); echo $turn->roll(); // we should be luckier with this next roll $turn->setLuck(200); echo $turn->roll();
About
LuckByDice is a PHP library for simulating dice rolls written in PHP. In addition to emulating standard dice rolls from dice notation, it can also emulate luck.
Rolls made with luck enabled have a natural ebb and flow to roll outcomes. Rolls made with higher luck are more likely to roll higher values. Luck is well suited for use with character's luck stat, which may feature unnatural modification.
Chart Test
This graph illustrates 10,000 consecutive 10d10 rolls to aid in statistical analysis. Notice how outcome impacts luck and vice versa.
Documentation
Author
Matthew Heroux.
See also the list of contributors who participated in this project.
Contributing
LuckByDice is open source software project. If you find a problem or want to discuss new features or improvements create an issue, and/or if possible create a pull request. For details, see CONTRIBUTING.md.
Acknowledgement
Thanks to Zachary Whitcomb-Paulson for dice notation expertise.
ouxsoft/luckbydice 适用场景与选型建议
ouxsoft/luckbydice 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.59k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dice」 「dice roller」 「luck」 「dice notation」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ouxsoft/luckbydice 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ouxsoft/luckbydice 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ouxsoft/luckbydice 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dice Roller, PSR compatible fork from https://github.com/ringmaster/dicecalc
Making it simple to integrate your application with Dice Jobs API.
Make die emoji roll a random number
Configurable roll of a dice
A really simple PHP library for parsing dice notation and rolling.
Official PHP client for SlicingDice, Data Warehouse and Analytics Database as a Service.
统计信息
- 总下载量: 7.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-19

