Example #1
0
 decimal ComputeDamage(Dragon good, Dragon bad)
 {
     if (rvr.MatchesPlan(good, bad))
     {
         return(rvr.ComputeDamage(good, bad));
     }
     else if (rvb.MatchesPlan(good, bad))
     {
         return(rvb.ComputeDamage(good, bad));
     }
     else if (rvg.MatchesPlan(good, bad))
     {
         return(rvg.ComputeDamage(good, bad));
     }
     else if (bvr.MatchesPlan(good, bad))
     {
         return(bvr.ComputeDamage(good, bad));
     }
     else if (bvb.MatchesPlan(good, bad))
     {
         return(bvb.ComputeDamage(good, bad));
     }
     else if (bvg.MatchesPlan(good, bad))
     {
         return(bvg.ComputeDamage(good, bad));
     }
     else if (gvr.MatchesPlan(good, bad))
     {
         return(gvr.ComputeDamage(good, bad));
     }
     else if (gvb.MatchesPlan(good, bad))
     {
         return(gvb.ComputeDamage(good, bad));
     }
     else if (gvg.MatchesPlan(good, bad))
     {
         return(gvg.ComputeDamage(good, bad));
     }
     else
     {
         Console.WriteLine("There are no matching battle plans.");
         return(0);
     }
 }
Example #2
0
 public decimal ComputeDamage(Dragon good, Dragon Bad)
 {
     return(good.GetSize() * 20);
 }
 public EmeraldDragon(string name, decimal size, bool good) : base(name, "Green", size, good)
 {
     Dragon dragon = new Dragon(name, "Green", size, good);
 }
 public RubyDragon(string name, decimal size, bool good) : base(name, "Red", size, good)
 {
     Dragon dragon = new Dragon(name, "Red", size, good);
 }
 public DragonBuilder()
 {
     dragon = null;
 }
Example #6
0
 public SapphireDragon(string name, decimal size, bool good) : base(name, "Blue", size, good)
 {
     Dragon dragon = new Dragon(name, "Blue", size, good);
 }