From d368b98736cf714aa053748f070b67477f5e1a1f Mon Sep 17 00:00:00 2001 From: openlegends Date: Mon, 18 Mar 2024 21:58:06 +0200 Subject: [PATCH] draft arena game constructor --- src/Test/Game/Arena.php | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/Test/Game/Arena.php b/src/Test/Game/Arena.php index caff6ac..05c8f22 100644 --- a/src/Test/Game/Arena.php +++ b/src/Test/Game/Arena.php @@ -6,38 +6,47 @@ namespace OpenLegends\Asset\Test\Game; class Arena extends \OpenLegends\Engine\Abstract\Game { - public function __construct( - \OpenLegends\Engine\Abstract\Player $player, + public function __construct() + { + $deck = new \OpenLegends\Asset\Test\Pool\Card(); - \OpenLegends\Engine\Abstract\Pool\Card $deck, - \OpenLegends\Engine\Abstract\Pool\Card $hand, - \OpenLegends\Engine\Abstract\Pool\Card $pile, + for ($i = 0; $i < 3; $i++) // generate 3 copies of each card + { + $deck->add( + new \OpenLegends\Asset\Test\Card\Goblin() + ); - \OpenLegends\Engine\Abstract\Pool\Card $left, - \OpenLegends\Engine\Abstract\Pool\Card $right - ) { - $this->setPlayer( - $player - ); + $deck->add( + new \OpenLegends\Asset\Test\Card\Mouse() + ); + + $deck->add( + new \OpenLegends\Asset\Test\Card\Rat() + ); + } $this->setDeck( $deck ); $this->setHand( - $hand + new \OpenLegends\Asset\Test\Pool\Card() ); $this->setPile( - $pile + new \OpenLegends\Asset\Test\Pool\Card() ); $this->setLeft( - $left + new \OpenLegends\Asset\Test\Pool\Card() ); $this->setRight( - $right + new \OpenLegends\Asset\Test\Pool\Card() + ); + + $this->setPlayer( + new \OpenLegends\Asset\Test\Player\Elf() ); } } \ No newline at end of file