two type test
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user