Exemple #1
0
    // the first condition checks that more than one player can rank up in this quest and the CPU has valid sponsorship.
    public bool firstCondition(List <Player> players, int stages, List <Card> hand)
    {
        strategyUtil strat = new strategyUtil();
        int          count = strat.rankUpCount(players, stages);

        return(count > 1 && strat.canISponsor(hand, stages));
    }
Exemple #2
0
    // The second condition checks that the CPU has a valid sponsorship and 6 or more foes.
    public bool secondCondition(List <Card> hand, int stages)
    {
        strategyUtil strat    = new strategyUtil();
        int          foeCount = 0;

        for (int i = 0; i < hand.Count; i++)
        {
            if (hand[i].type == "Foe Card")
            {
                foeCount += 1;
            }
        }
        return(foeCount > 5 && strat.canISponsor(hand, stages));
    }
Exemple #3
0
    // Quest Strategy
    public int sponsorQuest(List <Player> players, int stages, List <Card> hand, Controller game)
    {
        strategyUtil strat = new strategyUtil();

        if (strat.canSomeoneRankUp(players, stages))
        {
            return(0);
        }

        if (strat.canISponsor(hand, stages))
        {
            return(1);
        }
        return(0);
    }
Exemple #4
0
    // Quest Strategy
    public int sponsorQuest(List <Player> players, int stages, List <Card> hand, Controller game)
    {
        strategyUtil strat = new strategyUtil();

        // if somebody can rank up, we return false to decline sponsoring the quest
        if (strat.canSomeoneRankUp(players, stages))
        {
            return(0);
        }

        if (strat.canISponsor(hand, stages))
        {
            return(1);
        }
        return(0);
    }