public void AjouterAuChamp(Carte carteAjouter, int emplacement) { switch (emplacement) { case 1: Champ1 = (Unite)carteAjouter; EstEnPreparationChamp1 = true; VieChamp1 = carteAjouter.getDefense(); AttChamp1 = carteAjouter.getAttaque(); break; case 2: Champ2 = (Unite)carteAjouter; EstEnPreparationChamp2 = true; VieChamp2 = carteAjouter.getDefense(); AttChamp2 = carteAjouter.getAttaque(); break; case 3: Champ3 = (Unite)carteAjouter; EstEnPreparationChamp3 = true; VieChamp3 = carteAjouter.getDefense(); AttChamp3 = carteAjouter.getAttaque(); break; } }
public bool EffetPossible(Carte aJouer) { Carte laCarte = aJouer; Effet aTester = laCarte.EffetCarte; if (laCarte.EffetCarte != null) { aTester = laCarte.EffetCarte; if (aTester.Type == "impact" && ChoixEffetPossible(aTester) > 0) { return(true); } if (aTester.Type == "gain") { return(true); } if (aTester.Type == "recyclage" && RecyclagePossible(aTester)) { return(true); } } return(false); }
public void AjouterAuChamp(Carte carteAjouter) { if (EspaceDisponible()) { switch (EmplacementDisponible()) { case 1: Champ1 = (Batiment)carteAjouter; break; case 2: Champ2 = (Batiment)carteAjouter; break; case 3: Champ3 = (Batiment)carteAjouter; break; case 4: Champ4 = (Batiment)carteAjouter; break; } } }
public Exemplaire(Carte carte, int quantite, int idExemplaire) { Carte = carte; Quantite = quantite; IdExemplaire = idExemplaire; }