masakuuuu/dicegame

玩 dicegame

1.0.0 2022-09-19 06:07 UTC

This package is auto-updated.

Last update: 2024-09-19 15:07:07 UTC


README

日语

使用PHP程序实现6面体骰子

  • 实现内容
    • 有六个面
    • 每个面有一个1到6的数字
    • 摇动骰子以获得骰子上的任意一个数字

英文

在PHP程序中实现6面骰子

  • 实现细节
    • 有六个面
    • 有1到6的数字
    • 摇骰子以获得骰子上的一个数字

用法

$dice = new Dice();
$dice->setSided();
$dice->roll();
$dice->getSide();

PHPUnit 执行

vendor/phpunit/phpunit/phpunit test/DiceTest.php