Skip to content

Commit

Permalink
Princess Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hajek committed Nov 22, 2016
1 parent 33d2d21 commit 05ff34d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/Joueur.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,11 @@ public function getMain() {
}
}*/

private function deleteCard($carteMain_id){
$carteMain = Main::find($carteMain_id);
$carte = Cartes::where('id', $carteMain->carte_id)->firstOrFail();
Main::supprimerCarte($this->id, $carteMain_id);
private function deleteCard($carte_id){
Main::supprimerCarte($this->id, $carte_id);
$pileCartes = $this->getSalon()->getDefausse();
CartesDansPile::create([
'carte_id' => $carte->id,
'carte_id' => $carte_id,
'pile_cartes_id' => $pileCartes->id,
'joueur_id' => $this->id
]);
Expand Down Expand Up @@ -198,7 +196,7 @@ public static function elimine(){
$cartesDansMain = Main::where('joueur_id', $joueur->id)->cursor();

foreach ($cartesDansMain as $carteMain){
$joueur->deleteCard($carteMain->id);
$joueur->deleteCard($carteMain->carte_id);
}
}

Expand Down

0 comments on commit 05ff34d

Please sign in to comment.