private Card MatchOnNumber(Player player) { var numberCard = player.Hand.Where(x => !x.IsSpecialCard && x.Number == FaceCard.Number).FirstOrDefault(); if (numberCard != null) { Log("TURN", $"Player {player.Number} matched NUMBER {numberCard.DisplayCard()} with FaceCard {FaceCard.DisplayCard()} "); return(numberCard); } return(numberCard); }
private Card MatchOnColor(Player player) { var colorCard = player.Hand.Where(x => x.Color == FaceCard.Color).FirstOrDefault(); if (colorCard != null) { Log("TURN", $"Player {player.Number} matched COLOR {colorCard.DisplayCard()} with FaceCard {FaceCard.DisplayCard()}"); return(colorCard); } else { return(null); } }