Пример #1
0
        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;
            }
        }
Пример #2
0
        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);
        }
Пример #3
0
        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;
                }
            }
        }
Пример #4
0
 public Exemplaire(Carte carte, int quantite, int idExemplaire)
 {
     Carte        = carte;
     Quantite     = quantite;
     IdExemplaire = idExemplaire;
 }