masakuuuu / dicegame
play dicegame
1.0.0
2022-09-19 06:07 UTC
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