Examples of CardSim


Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

                    jTextBlockers.setText(""+mSim.getBlocker());
                    jTextBlockers.setToolTipText(""+mSim.getBlocker());
                }
            }
            jLabelStatus.setText("");
            CardSim card = sim;
            jTextFieldCardID.setText(card.getId());
            jTextFieldCardID.setToolTipText(card.getNowCardAbilities());
            jTextFieldCardName.setText(card.getName());
            jTextFieldCardType.setText(card.getType());
            jTextFieldCardSubType.setText(card.getSubtype());
            jTextFieldCardPower.setText(""+card.getNowPower());
            jTextFieldCardToghness.setText(""+card.getNowToughness());
            jTextFieldCardColor.setText(""+card.getNowColor());
            jTextFieldCardMana.setText(""+card.getManaString());
            jTextAreaCardText.setText(""+card.getText());
            if (card.isTapped()) jLabelTapped.setText("(T)"); else jLabelTapped.setText("(U)");
        }
        else
        {
            jTextFieldCardID.setText("");
            jTextFieldCardName.setText("");
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

       
        if (lands.size() < 10)
            ret += lands.size();
        for(int i=0; i< lands.size(); i++)
        {
            CardSim card =  lands.getCard(i);
            if (!card.isTapped()) ret++;
        }
       
       
        score = ret;
        return ret;
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

    {
        int ret =0;
        Vector<CardSim> cards = field.getCards();
        for (int i = 0; i < cards.size(); i++)
        {
            CardSim card = cards.elementAt(i);
            int subScore=getBaseScore(card) + PLAY_minor;
            // could look if there are creatures of one family
            ret += subScore;
        }
        score = ret*2;
 
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

    {
        int ret =0;
        Vector<CardSim> cards = grave.getCards();
        for (int i = 0; i < cards.size(); i++)
        {
            CardSim card = cards.elementAt(i);
            int subScore=getBaseScore(card) + GRAVE_minor;
            // could look if there are creatures of one family
            ret += subScore;
        }
        score = ret;
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

        Vector<CardSim> cards = grave.getCards();
        int s = 0;
        for (int i = 0; i < cards.size(); i++)
        {
            CardSim card = cards.elementAt(i);
            int subScore=0;
            subScore += card.getRealPower();
            subScore += card.getRealToughness();
            subScore += (card.getNowCardAbilities().length()+3)/6;
            s += (subScore+1)/2;
//System.out.println("Grave Subscore: "+card+" -> "+s+"\""+card.getNowCardAbilities()+"\"");
        }
        score = vMatch.getPlayer(playerNo).getDeck().size()-(grave.size()-round)-s;
        return score;
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

       
       
        Vector<CardSim> cards = hand.removeTypes("Land").getCards();
        for (int i = 0; i < cards.size(); i++)
        {
            CardSim card = cards.elementAt(i);
            int subScore=getBaseScore(card) + HAND_minor;

            ret += subScore;
        }

        // double cards that can be played
        CardSimList handwoLands = hand.removeTypes("Land");
        CardSimList playable = CardSimList.onlyEnoughManaGeneral(handwoLands, lands);
        for(int i=0; i< playable.size(); i++)
        {
            CardSim card = playable.getCard(i);
            int subScore=getBaseScore(card);
            ret += subScore;
        }

        score = ret;
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

        {
            EAIAction eAIAction = resultStack.elementAt(i);
            // make sure only our own actions, not the simulation of our opponents actions remain!
            // in future (control change) this might differ!
            // TODO: Control Change Dif
            CardSim c = eAIAction.getSCard();
            if (c != null)
            {
                if (c.getOwner() != player)
                {
                    resultStack.remove(i);
                    continue;
                }
            }
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim


        // reduce to one land per type
        for (int i=0; i <list.size(); i++)
        {
            CardSim c = list.getCard(i);
            if (c.getType().equals(card.getType()))
            {
                if (c.getNowColor().equals(card.getNowColor()))
                {
                    if (!first)
                    {
                        first = true;
                    }
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

        key+="attacker:";
        // removed possible attackers are interesting for blocking a re attack! (Evaluation)
        generatePossibleAttackers(p, possibleAttackers, removedPossibleAttackers);
        for(int c=0; c< possibleAttackers.size(); c++)
        {
            CardSim card = possibleAttackers.getCard(c);
            key += card.getCard().getUniqueID()+": "+card.getNowPower()+"/"+card.getNowToughness()+""+card.getNowCardAbilities();
        }
        for(int c=0; c< removedPossibleAttackers.size(); c++)
        {
            CardSim card = removedPossibleAttackers.getCard(c);
            key += card.getCard().getUniqueID()+": "+card.getNowPower()+"/"+card.getNowToughness()+""+card.getNowCardAbilities();
        }
       
        // BLOCKERS
        CardSimList blocker = vMatch.getBattlefield(o).getSubListByType("Creature").onlyTapstate(false);

        // remove creatures with activation ability
//        blocker = blocker.onlyTapstate(false);
        // strange things happen - there was a cache hit, where actions in attavk were done on opponents
        // creatures that were not in comnbat
        // and this cretaure was on hit removed to lib - null pointer exeption...
        // thererfor here - ALL opponents creaturs
        key+="blocker:";
        for(int c=0; c< blocker.size(); c++)
        {
            CardSim card = blocker.getCard(c);
            key += card.getCard().getUniqueID()+": "+card.getNowPower()+"/"+card.getNowToughness()+""+card.getNowCardAbilities();
        }

        // attacker may decide to cats instants in attack phase on blockers which are even tapped!
        if ((playerIsAttacker) && (vMatch.getHand(p).onlyWithTypes("Instant").size() >0))
        {
            blocker = vMatch.getBattlefield(o).getSubListByType("Creature").onlyTapstate(true);
            key+="tapped blocker:";
            for(int c=0; c< blocker.size(); c++)
            {
                CardSim card = blocker.getCard(c);
                key += card.getCard().getUniqueID()+": "+card.getNowPower()+"/"+card.getNowToughness()+""+card.getNowCardAbilities();
            }
        }


        return key;
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.enhancedSim.CardSim

        ret+=handwoLands.size();

        CardSimList playable = CardSimList.onlyEnoughManaGeneral(handwoLands, lands);
        for(int i=0; i< playable.size(); i++)
        {
            CardSim card = playable.getCard(i);
            ret += card.getManaCost();
        }
        score = ret;
        return ret;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.