Esempio n. 1
0
 /**
  * Eliminazione elemento da Matrice
  * @param FishInterface $fish
  * @return null
  */
 public function delete(FishInterface $fish)
 {
     $pos = $this->matrix->search($fish);
     if ($pos == null) {
         return null;
     }
     $this->population = $this->copyArrayWithoutFish($fish);
     $this->matrix->put(self::OCEAN, $pos);
 }