public bool Equals(IEquatable card) { if (Normal.ReferenceEquals(this, card)) { Normal aux = (Normal)card; if (aux.Cor == this.cor) { return(true); } else { return(false); } } else { Especial aux = (Especial)card; if (this.cor == aux.Cor) { return(true); } else { return(false); } } }
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); }
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); }
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); }
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); }