Exemple #1
0
 private void HideControls()
 {
     PictureBoxPathPos1.Hide();
     PictureBoxPathPos2.Hide();
     ListBoxItems.Items.Clear();
     ListBoxItems.Hide();
     ButtonUseCard.Hide();
     ButtonDiscardCard.Hide();
     ButtonEndTurn.Hide();
     LabelGoalCard.Text = "";
 }
        private void TileSelectMap(object sender)
        {
            CardSet[] goalCards = Game.Cards.Where(card => card.Type == CardType.GoalPath).ToArray();

            for (int i = 0; i < goalCards.Count(); i++)
            {
                if (fieldTiles[(int)goalCards[i].FieldCol - 1, (int)goalCards[i].FieldRow - 1] == sender)
                {
                    if (goalCards[i].Path == (Direction.Down | Direction.Left | Direction.Right | Direction.Up))
                    {
                        LabelGoalCard.Text = "Gold";
                    }
                    else
                    {
                        LabelGoalCard.Text = "Coal";
                    }
                    HideHand();
                    Game.DiscardCard(Game.Player.SelectedCard);
                    ButtonEndTurn.Show();
                    ButtonDiscardCard.Hide();
                    break;
                }
            }
        }