Example #1
0
        private void HighlightHand(object sender, RoutedEventArgs e)
        {
            HandDisplay source = (HandDisplay)e.OriginalSource;

            if (source.PlayerHand != null)
            {
                gameBoard.SelectExclusiveCards(new List <Card>(source.PlayerHand));
                e.Handled = true;
            }
        }
Example #2
0
    private void GenerateHand(int index)
    {
        GameObject go = Instantiate(handPrefab, placeHolders[index].transform);

        go.transform.localPosition = Vector3.zero;
        HandDisplay handDisplay = go.GetComponent <HandDisplay>();

        handDisplay.player = players.Items[index];
        hands.Add(go);
    }
Example #3
0
        private void SelectHand(object sender, RoutedEventArgs e)
        {
            HandDisplay source = (HandDisplay)e.OriginalSource;

            if (source.PlayerHand != null)
            {
                List <Card>        clone      = new List <Card>();
                IEnumerator <Card> enumerator = source.PlayerHand.GetAllCards();
                while (enumerator.MoveNext())
                {
                    clone.Add(enumerator.Current);
                }
                gameBoard.SelectExclusiveCards(clone);
                e.Handled = true;
            }
        }