tigo/lottery

v0.0.3 2021-05-28 19:38 UTC

This package is auto-updated.

Last update: 2024-08-29 03:00:32 UTC


README

巴西主要彩票游戏(Mega-Sena, Quina, Lotomania 和 Lotofácil)的随机数字生成器。

您还可以选择使用标准方法生成其他类型的游戏

  • 该包可用于任何PHP应用程序或框架/PHP。
  • 下载包: composer require tigo/lottery
  • MIT许可证。 请自由使用此项目留下一个星号⭐或进行分支!

如果您认为此项目有用,请考虑捐赠以支持开发者。

paypal paypal

简介

在您的项目中的某个地方,您可能需要使用自动加载

include __DIR__ ."/vendor/autoload.php";

示例:使用巴西彩票游戏的数字生成器

 use Tigo\Lottery\LotteryBr; //import class
 
 $game = new LotteryBr();
 
 /**
   First parameter: Choose the number of numbers you want to play.
   Second parameter: Number of tickets you want to play.
   return: array [][].
 **/
 $game->megaSena(6,2);
 $game->quina(5,2);
 $game->lotoFacil(15,2);
 $game->lotoMania(50,2);
 $game->superSete(7,2);

示例:生成随机数字和 Mega-Sena 投票数量

   print_r($game->megaSena(6,2)); 
   /**result: 
   [
     [0]=> [07,17,31,32,40,47]
     [1]=> [10,23,35,37,39,40]
   ]
   **/

示例:生成其他类型的游戏

  use Tigo\Lottery\LotteryPattern; // import class
  $pattern = new LotteryPattern();
  
  /**
   Building the random draw rule
   First parameter:  minimum = 20 
   Second parameter: maximum = 30
   [20,21,22,23,24,25,26,27,28,29,30]
  **/
  
  print_r($pattern->makeGame(20, 30, 3, 2));
  
   /**result: 
   [
     [0]=> [20,21,26]
     [1]=> [26,27,29]
   ]
   **/

支持此项目

如果您有兴趣支持此项目,您可以通过多种方式帮助。留下一个星号⭐或捐赠任何金额。

贡献者

许可证

MIT许可证。查看存档 许可证