masakuuuu/dicegame

play dicegame

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 1

pkg:composer/masakuuuu/dicegame

1.0.0 2022-09-19 06:07 UTC

This package is auto-updated.

Last update: 2025-09-19 17:25:37 UTC


README

日本語

6面体のサイコロをPHPのプログラムで実装

  • 実装内容
    • 6つ面を持っている
    • 1から6までの数字を1つずつ持っている
    • サイコロを振ることでサイコロが持ついずれかの数字を得る

English

Implementing 6-sided dice in a PHP program

  • Implementation details
    • Has six faces
    • Has one number from 1 to 6
    • Roll the dice to get one of the numbers the dice have

Use

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

PHPUnit 実行

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