dgunay/good-bans
Composer 安装命令:
composer require dgunay/good-bans
包简介
A statistical League of Legends ban ranker.
README 文档
README
Basically a reimplementation of http://bestbans.com. That site has been out of maintenance for a super long time and I loved using it, so I got fed up and remade it.
GoodBans (exactly like BestBans) decides what champions are most likely to pose a threat to you if not on your team by calculating which champions are the most commonly-picked and highest winrate. The reasoning is that even though some champions with dedicated mains can pull very high winrates, you are far more likely to meet a popular champion with a good winrate. Since you can't know who is on the enemy team, the most statistically beneficial strategy is to ban out the most common and effective solo queue threats.
This logic completely ignores team composition and purely favors a law of large numbers approach, so use it if you are simply not sure what to ban. Oh, and don't ban away champions your teammates want to pick. That's a dick move and you'll probably hurt your chances of winning.
Requirements
- PHP 7.1+
Installation
-
Create a database. Can be whatever vendor you want, but I used SQLite3.
-
To refresh the database, use
refresh_db.phpas an example:
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/../config.php'; use GoodBans\OpGG; use GoodBans\RiotChampions; use GoodBans\ChampionsDatabase; $db = new ChampionsDatabase( new \PDO('sqlite:/path/to/your_db.db'), // use whatever PDO you like new OpGG(), new RiotChampions() ); $db->refresh(); // prepares the tables and fetches data from the interwebs!
- Put something like this in your HTML
use GoodBans\ChampionsDatabase; use GoodBans\TopBans; use GoodBans\View; $bans = $db->topBans(); $view = new View($bans); echo $view->render();
You can also just use the TopBans model to make your own view.
Development
Master branch is to remain deployable at all times. Development is merged into
release candidate branches (example: rc-1.0). Patches continue from release
candidate branches and are merged back into master with an appropriate tag.
Running Tests
The run_tests.php script should handle it, but otherwise you can just do
php ./vendor/bin/phpunit ./test. Tests require PDO SQLite3.
Contributing
GoodBans is intended to provide the same ban efficacy analysis methodology with any set of data (though obviously the results depend on what the data looks like).
If you know any good LoL stat aggregators with a friendly API or (ethically)
scrapable interface, one of the most awesome things you can do is write a
subclass of ChampionsDataSource for that site. Just make sure that the stats
are separated by elo, and they at least have per-champion win/ban/pickrates.
dgunay/good-bans 适用场景与选型建议
dgunay/good-bans 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dgunay/good-bans 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dgunay/good-bans 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-20