Example #1
0
        public void PlayerSendCard(Player player, ICollection <CardGroup> cardGroups)
        {
            if (Ruler.IsValidateForPlayer(player.Cards.ToCardGroups(), cardGroups) && Ruler.IsValidate(this, cardGroups))
            {
                var cards = cardGroups.ToCards();
                player.RemoveCard(cards);
                LastSendIndex = Cycle.List.FindIndex(p => p == player);

                GroupSender.Send($"{player.ToAtCode()} 出牌: {cards.ToCardString()}");
                Cycle.MoveNext();
                Tick();
            }
            else
            {
                GroupSender.Send("你出的牌无效");
            }
        }