two type test

This commit is contained in:
lopar
2019-01-12 00:05:20 +02:00
parent 6a791d528e
commit 2da8f9c7a0
2 changed files with 11 additions and 9 deletions
+11
View File
@@ -2,10 +2,21 @@
class ShopItem extends Item
{
private $cost;
private $count;
private function __construct($row)
{
parent::__construct($row);
$this->cost = $row['cost'];
$this->count = $row['count'];
}
public function printInfo()
{
parent::printBaseInfo();
echo "<br>Цена" . $this->wrap($this->cost) . " пымпочек";
if ($this->count > 0) echo "<br><small>(Осталось: {$this->count} штук)</small>";
parent::printRequirements();
parent::printBonuses();
}