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
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: 9.*
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