isBlack property
Is this card black? Note that while jokers have no suit, there is a black one and a red one.
Implementation
bool get isBlack {
if (index == Card.BlackJoker.index) return true;
if (index < Card.LowAceOfClubs.index || index > Card.AceOfSpades.index) {
return false;
}
return (index & 3) == Suit.Club.index - 1 ||
(index & 3) == Suit.Spade.index - 1;
}