Package csa.jportal.ai.namedai

Examples of csa.jportal.ai.namedai.NamedAIData


            mHintAI = new EnhancedAI();
       
       
            String aiName = "HintNAI";
            NamedAIDataPool mNamedAIDataPool = new NamedAIDataPool();
            NamedAIData namedAIData = mNamedAIDataPool.get(aiName);
            AIPlayer cplayer = new AIPlayer(namedAIData.getAIUsed());
            cplayer.mNamedAI = namedAIData;
            cplayer.setSelectedDeckName("NoDeck");
            CardDeck.mDummyLoadingActive = true;
            mHintPlayer = new MatchComputerPlayer(cplayer);
            CardDeck.mDummyLoadingActive = false;
View Full Code Here


    public void addPlayer(String namedAIName)
    {
        if (namedAIName.length() == 0) return;

        NamedAIData namedAIData = mNamedAIDataPool.get(namedAIName);
        AIPlayer cplayer = new AIPlayer(namedAIData.getAIUsed());
        cplayer.mNamedAI = namedAIData;
        String stratName = namedAIData.getAIStrategieSetting();
        String bufstratName = namedAIData.getAIBoosterStrategieSetting();

        AIStrategie st = mAIStrategiePool.get(stratName);
        AIBoosterStrategie bst = mAIBoosterStrategiePool.get(bufstratName);
        if (st != null) cplayer.mStrategie = st;
        if (bst != null) cplayer.mBoosterStrategie = bst;
        cplayer.setBoosterMode(true);
       
        cplayer.setSelectedDeckName("Booster");
        MatchComputerPlayer player = new MatchComputerPlayer(cplayer);
        BoosterPlayer p = new BoosterPlayer();
        ComputerQuickPanel panel = new ComputerQuickPanel();
        panel.setParent(this);
        panel.setNumber(mPlayers.size());
        //p.name = namedAIName;
        p.name = namedAIData.getNamedName();
        p.type = player.getPlayerType();
        p.no = mPlayers.size()+playerAvailable;
        p.cplayer = player;
        p.panel = panel;

        jPanel3.add(panel);
        panel.setActive(false);
        panel.setName(p.name);

        try
        {
            Image image = csa.util.UtilityImage.loadImage(namedAIData.getImagePath());
            jLabel1.setText("");
            panel.setIcon(new ImageIcon(image.getScaledInstance(40, 48, java.awt.Image.SCALE_SMOOTH)));
        }
        catch(Throwable e) {}
View Full Code Here

        Collection<NamedAIData> colNAI = mNamedAIDataPool.getHashMap().values();
        Iterator<NamedAIData> iterNAI = colNAI.iterator();

        while (iterNAI.hasNext())
        {
            NamedAIData item = iterNAI.next();
            ais.addElement(item.mName);
        }
        jComboBoxAITest.removeAllItems();
        jComboBoxAIFixed.removeAllItems();
        for (int i = 0; i < ais.size(); i++)
View Full Code Here

        mPhaseDoneInTurn = new boolean[PHASE_UNDEFINED];
        mQueue = new MyMessageQueue();
        mBreak = false;
        if (mAIPlayer == null)
        {
            NamedAIData namedAIData = mNamedAIDataPool.get("Default");
            mAIPlayer = new AIPlayer(namedAIData.getAIUsed());
            mAIPlayer.mNamedAI = namedAIData;
            String stratName = namedAIData.getAIStrategieSetting();
            AIStrategie st = mAIStrategiePool.get(stratName);
            if (st != null) mAIPlayer.mStrategie = st;
        }
        mAIPlayer.init();
        String mId = getMatch().getMatchID();
View Full Code Here

TOP

Related Classes of csa.jportal.ai.namedai.NamedAIData

Copyright © 2018 www.massapicom. 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.