Ejemplo n.º 1
0
        public void CurrentPlayerThrowsCard(Card card)
        {
            var itemToRemove = myHand.FirstOrDefault(u => u.Color == card.Color && u.Number == card.Number);

            myHand.Remove(itemToRemove);
            ThrowCardOnTheField(card);

            switch (card.Type)
            {
            case "SkippingCard":     //Skiping card
            {
                NextPlayer();
                break;
            }

            case "ReversingCard":     //Reverse card
            {
                ChangeReverse();
                break;
            }

            case "BuyingCard":     //Buying card
            {
                NextPlayerBuy(card.Buy);
                break;
            }

            case "ChangingCard":
            {
                using (var form = new ColorForm())
                {
                    var result = form.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        SetFieldColor(form.ReturnColor);
                    }
                    else
                    {
                        SetFieldColor(0);
                    }
                }
                break;
            }

            default:
            {
                break;
            }
            }

            NextPlayer();
        }
Ejemplo n.º 2
0
        private void настройкаЦветаБейджаToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ColorForm cf = new ColorForm();

            cf.ShowDialog();
        }