예제 #1
0
        public void ChamgementAffectation(Monstre monstre, Attraction attraction)
        {
            if (monstre.Affectation != attraction)
            {
                monstre.Affectation = attraction;
            }

            else
            {
                Console.WriteLine("Impossible de modifier, il est dèja affecter a cette attractin ");
            }
        }
예제 #2
0
        public void DesincrementerCagnotte(Monstre monstre, int point)
        {
            int cagnotte = monstre.Cagnotte - point;

            if (cagnotte < 50)
            {
                //exemple
                Attraction boutique = new Boutique(true, TimeSpan.FromMinutes(56), null, 45, false, null, 45, "pour les nul", true, "besoin de sucre", Boutique.typeBoutique.barbeAPapa);
                monstre.Affectation = boutique;
            }

            if (monstre is Zombie || monstre is Demon)
            {
                if (cagnotte > 500)
                {
                    monstre.Affectation = null;
                }
            }
        }