Exemplo n.º 1
0
 /**
  * Trajectoire constructor.
  * @param Partie $partie
  * @param Hexa $origine
  * @param Joueur $pov
  * @param Hexa $destination
  */
 public function __construct(Partie $partie, Hexa $origine, Joueur $pov, $destination = null)
 {
     $this->partie = $partie;
     $this->origine = $origine;
     $this->destination = $destination;
     $this->pov = $pov;
     $this->hexas = new HexaCollection();
     $this->hexasInterdits = new HexaCollection();
     if ($origine->getIdJoueur() == $pov->getId()) {
         $this->hexasInterdits->ajout($origine);
     }
 }