示例#1
0
    public List <Card> setUpEarlyFoeEncounter(List <Card> hand, string questFoe, int prev)
    {
        strategyUtil strat        = new strategyUtil();
        List <Card>  foeEncounter = new List <Card>();
        List <Card>  foes         = new List <Card>();

        for (int i = 0; i < hand.Count; i++)
        {
            if (hand[i].type == "Foe Card" && strat.getValidCardBP(hand[i], new List <Player>(), questFoe) < prev)
            {
                foes.Add(hand[i]);
            }
        }

        foes = strat.sortFoesByDescendingOrder(foes, questFoe);
        foeEncounter.Add(foes[0]);
        hand.Remove(foes[0]);

        for (int i = 0; i < hand.Count; i++)
        {
            if (hand[i].type == "Weapon Card" && strat.hasMultiple(hand, hand[i].name) && strat.checkDuplicate(hand[i], foeEncounter, "Weapon Card") && ((strat.sumFoeEncounterCards(foeEncounter, questFoe) + strat.getValidCardBP(hand[i], new List <Player>(), questFoe) < prev)))
            {
                foeEncounter.Add(hand[i]);
                hand.Remove(hand[i]);
            }
        }
        return(foeEncounter);
    }
示例#2
0
    public List <Card> playBid(List <Card> hand, int round)
    {
        strategyUtil strat = new strategyUtil();
        // this CPU bids with any test cards, foe cards of less than 30bp and duplicate weapons (1 of each)
        List <Card> bid = playBid(hand, round);

        if (round > 1)
        {
            return(bid);
        }
        for (int i = 0; i < hand.Count; i++)
        {
            if (hand[i].type == "Test Card")
            {
                bid.Add(hand[i]);
            }
            if (hand[i].type == "Foe Card")
            {
                FoeCard foe = (FoeCard)hand[i];
                if (foe.minBP < 30)
                {
                    bid.Add(hand[i]);
                }
            }
            if (hand[i].type == "Weapon Card" && strat.hasMultiple(hand, hand[i].name) && strat.checkDuplicate(hand[i], bid, hand[i].type))
            {
                bid.Add(hand[i]);
            }
        }
        return(bid);
    }
示例#3
0
    // low stakes tournament, will only play weapons of which there are 2 or more
    public List <Card> lowStakesTournament(List <Card> hand)
    {
        strategyUtil strat       = new strategyUtil();
        List <Card>  cardsToPlay = new List <Card>();

        // loop through the hand
        for (int i = 0; i < hand.Count; i++)
        {
            // if it is a weapon and our hand has multiple we play it
            if (hand[i].type == "Weapon Card" && strat.hasMultiple(hand, hand[i].name) && strat.checkDuplicate(hand[i], cardsToPlay, "Weapon Card"))
            {
                cardsToPlay.Add(hand[i]);
                hand.Remove(hand[i]);
            }
        }
        return(cardsToPlay);
    }