mirror of
https://github.com/openlegends/asset-php.git
synced 2025-02-08 13:04:22 +00:00
draft arena game constructor
This commit is contained in:
parent
932638c4ca
commit
d368b98736
@ -6,38 +6,47 @@ namespace OpenLegends\Asset\Test\Game;
|
|||||||
|
|
||||||
class Arena extends \OpenLegends\Engine\Abstract\Game
|
class Arena extends \OpenLegends\Engine\Abstract\Game
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct()
|
||||||
\OpenLegends\Engine\Abstract\Player $player,
|
{
|
||||||
|
$deck = new \OpenLegends\Asset\Test\Pool\Card();
|
||||||
|
|
||||||
\OpenLegends\Engine\Abstract\Pool\Card $deck,
|
for ($i = 0; $i < 3; $i++) // generate 3 copies of each card
|
||||||
\OpenLegends\Engine\Abstract\Pool\Card $hand,
|
{
|
||||||
\OpenLegends\Engine\Abstract\Pool\Card $pile,
|
$deck->add(
|
||||||
|
new \OpenLegends\Asset\Test\Card\Goblin()
|
||||||
|
);
|
||||||
|
|
||||||
\OpenLegends\Engine\Abstract\Pool\Card $left,
|
$deck->add(
|
||||||
\OpenLegends\Engine\Abstract\Pool\Card $right
|
new \OpenLegends\Asset\Test\Card\Mouse()
|
||||||
) {
|
);
|
||||||
$this->setPlayer(
|
|
||||||
$player
|
$deck->add(
|
||||||
);
|
new \OpenLegends\Asset\Test\Card\Rat()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->setDeck(
|
$this->setDeck(
|
||||||
$deck
|
$deck
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->setHand(
|
$this->setHand(
|
||||||
$hand
|
new \OpenLegends\Asset\Test\Pool\Card()
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->setPile(
|
$this->setPile(
|
||||||
$pile
|
new \OpenLegends\Asset\Test\Pool\Card()
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->setLeft(
|
$this->setLeft(
|
||||||
$left
|
new \OpenLegends\Asset\Test\Pool\Card()
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->setRight(
|
$this->setRight(
|
||||||
$right
|
new \OpenLegends\Asset\Test\Pool\Card()
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setPlayer(
|
||||||
|
new \OpenLegends\Asset\Test\Player\Elf()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user