Пример #1
0
 public override bool Compatible(ICompatible card, Cor color)
 {
     if (card is Normal)
     {
         Normal aux = (Normal)card;
         if (color != 0)
         {
             if (color == aux.Cor)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     else if (card is Especial)
     {
         Especial aux = (Especial)card;
         if (color != 0)
         {
             if (color == aux.Cor)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Пример #2
0
 public override bool Compatible(ICompatible card, Cor color)
 {
     if (card is Normal)
     {
         Normal aux = (Normal)card;
         if (color == 0 && aux.Cor == this.cor)
         {
             return(true);
         }
         else if (color == aux.Cor)
         {
             return(true);
         }
     }
     else if (card is Especial)
     {
         Especial aux = (Especial)card;
         if (color == 0 && this.cor == aux.Cor || this.efeito == aux.efeito)
         {
             return(true);
         }
         else if (color == aux.cor)
         {
             return(true);
         }
     }
     else
     {
         return(true);
     }
     return(false);
 }
Пример #3
0
 public override bool Compatible(ICompatible card, Cor color)
 {
     if (card is Normal)
     {
         Normal auxN = (Normal)card;
         if (color == 0 && this.cor == auxN.Cor || this.numero == auxN.numero)
         {
             return(true);
         }
         else if (auxN.Cor == color)
         {
             return(true);
         }
     }
     else if (card is Especial)
     {
         Especial auxE = (Especial)card;
         if (color == 0 && this.cor == auxE.Cor)
         {
             return(true);
         }
         else if (auxE.Cor == color)
         {
             return(true);
         }
     }
     else
     {
         return(true);
     }
     return(false);
 }
Пример #4
0
 public override bool Compatible(ICompatible card)
 {
     if (card is Normal)
     {
         Normal aux = (Normal)card;
         if (aux.Cor == this.cor || aux.numero == this.numero)
         {
             return(true);
         }
     }
     else if (card is Especial)
     {
         Especial aux = (Especial)card;
         if (this.cor == aux.Cor)
         {
             return(true);
         }
     }
     else
     {
         return(true);
     }
     return(false);
 }
Пример #5
0
 public bool IsCompatibleWith(ICompatible Compatibility, Component component)
 {
     return(Compatibility.IsCompatibleWith(this, component));
 }
Пример #6
0
 public DPage GetPage(ICompatible compatible)
 {
     return compatible == null ? null : Pages.FirstOrDefault(page => compatible.Equals(page.PageBody.Data));
 }
Пример #7
0
 public override bool Compatible(ICompatible card)
 {
     return(true);
 }
Пример #8
0
 public abstract bool Compatible(ICompatible card, Cor color);
Пример #9
0
 public abstract bool Compatible(ICompatible card);