Esempio n. 1
0
        void CardBox_MouseClick(object sender, MouseEventArgs e)
        {
            if (gameLogic.IsMyTurn() && !this.finish)
            {
                var cardBox = sender as PictureBox;

                Card c = (Card)cardBox.Tag;

                Card f = gameLogic.GetTopCardField();
                if (gameLogic.CanthrowCard(c))
                {
                    bought = false;
                    gameLogic.AddTopCardToDeck(f);
                    gameLogic.CurrentPlayerThrowsCard(c);
                    panelMyCards.Controls.Clear();
                    RefreshCards();
                    EndMyTurn();
                }
            }
        }