From 900f37312aee01b1b6c847049ec45ea6eac1d057 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Tue, 1 Feb 2022 10:33:15 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB(=D0=B0)=20?= =?UTF-8?q?'ItemRoulette/index.php'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ItemRoulette/index.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ItemRoulette/index.php diff --git a/ItemRoulette/index.php b/ItemRoulette/index.php new file mode 100644 index 0000000..82455e2 --- /dev/null +++ b/ItemRoulette/index.php @@ -0,0 +1,21 @@ + 0.25, 'item-2' => 0.5, 'item-3' => 5, 'item-4' => 4.25333]; +$prize->setItems($items); +var_dump($prize->loot()); +var_dump($prize->loot(5)); + +/*string(6) "item-4" +array(5) { + [0]=> + string(6) "item-3" + [1]=> + string(6) "item-4" + [2]=> + string(6) "item-3" + [3]=> + string(6) "item-2" + [4]=> + string(6) "item-3" +}*/ \ No newline at end of file