Exemple #1
0
    public void SetupScore()
    {
        CardSetHandler cardSet = GameManager.Instance.cardSetHandler;

        List <Card> firstLineCard  = new List <Card>();
        List <Card> secondLineCard = new List <Card>();
        List <Card> thirdLineCard  = new List <Card>();

        for (int i = 0; i < player.cardsOnHand.cards.Count; i++)
        {
            if (i < 3)
            {
                firstLineCard.Add(player.cardsOnHand.cards[i]);
            }
            else if (i > 2 && i <= 7)
            {
                secondLineCard.Add(player.cardsOnHand.cards[i]);
            }
            else
            {
                thirdLineCard.Add(player.cardsOnHand.cards[i]);
            }
        }

        var firstLine  = new KeyValuePair <Card, int>(cardSet.CheckFirstLineCard(firstLineCard).Key, (int)cardSet.CheckFirstLineCard(firstLineCard).Value);
        var secondLine = new KeyValuePair <Card, int>(cardSet.CheckSecondLineCard(secondLineCard).Key, (int)cardSet.CheckSecondLineCard(secondLineCard).Value);
        var thirdLine  = new KeyValuePair <Card, int>(cardSet.CheckSecondLineCard(thirdLineCard).Key, (int)cardSet.CheckSecondLineCard(thirdLineCard).Value);

        scoreFirstLine  = firstLine;
        scoreSecondLine = secondLine;
        scoreThirdLine  = thirdLine;
    }
Exemple #2
0
 public void CheckFirstLine()
 {
     uiHandler.SetFirstText(cardSetHandler.CheckFirstLineCard(firstLineSet).Value.ToString());
 }