Examples of Weighting


Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

        Set entries = allWeightings.entrySet();
        Iterator it = entries.iterator();
        while (it.hasNext())
        {
            Map.Entry entry = (Map.Entry) it.next();
            Weighting value = (Weighting) entry.getValue();
            jComboBox1.addItem(value.getName());
        }

       
       
       
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

            }


            int mPlayerTurn = mMatch.getPlayerTurn();
            Weighting.resetAllWeightings();
            Weighting weightingUsed = Weighting.DEFAULT;

            if (mPlayer instanceof MatchComputerPlayer)
            {
                MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
                AIPlayer aip = cp.getAIPlayer();
                if (!aip.isScriptedAI())
                {
                    EAIConfigurationData eaiConfig = aip.getEAIConfig();
                    if (eaiConfig != null)
                    {
                        String wName = eaiConfig.getActiveWeightingCollection();
                        weightingUsed = Weighting.buildWeighting(wName);
                    }
                }
            }

            if (mVMatch == null)
            {
                mPlayerTurn = mMatch.getPlayerTurn();
                weightingUsed.buildScore(mMatch, mPlayerTurn, false);
                weightingUsed.buildScore(mMatch, (mPlayerTurn+1)%2, false);
            }
            else
            {
                mPlayerTurn = mPlayerNo;
                weightingUsed.buildScore(mVMatch, mPlayerTurn, false);
                weightingUsed.buildScore(mVMatch, (mPlayerTurn+1)%2, false);
            }
            WeightingPanel panel = new WeightingPanel(mPlayerTurn, weightingUsed, true);
            panel.setPanelView();

            jPanelScore.removeAll();
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

        int mPlayerTurn = mMatch.getPlayerTurn();
        Weighting.resetAllWeightings();

      
        Weighting weightingUsed = Weighting.DEFAULT;
        if (mPlayer instanceof MatchComputerPlayer)
        {
            MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
            AIPlayer aip = cp.getAIPlayer();
            if (!aip.isScriptedAI())
            {
                EAIConfigurationData eaiConfig = aip.getEAIConfig();
                if (eaiConfig != null)
                {
                    String wName = eaiConfig.getActiveWeightingCollection();
                    weightingUsed = Weighting.buildWeighting(wName);
                }
            }
        }

        if (mVMatch == null)
        {
            mPlayerTurn = mMatch.getPlayerTurn();
            weightingUsed.buildScore(mMatch, mPlayerTurn, false);
            weightingUsed.buildScore(mMatch, (mPlayerTurn+1)%2, false);
        }
        else
        {
            mPlayerTurn = mPlayerNo;
            weightingUsed.buildScore(mVMatch, mPlayerTurn, false);
            weightingUsed.buildScore(mVMatch, (mPlayerTurn+1)%2, false);
        }

        WeightingPanel panel = new WeightingPanel(mPlayerTurn, weightingUsed);
        mMatch.getMainDisplay().showPanelModal(panel, "Weighting player: " +mPlayerTurn, 750, 400);
    }//GEN-LAST:event_jButton3ActionPerformed
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

//        if (getRound() == 2) loser = mPlayers[0];
        if (loser!=null)
        {
            playSound(null, SoundEffect.FX_EFFECT_GAME_END);

            Weighting weightingUsed = Weighting.DEFAULT;
            if (mPlayerTurn == 0)
            {
                if (mPlayers[0] instanceof MatchComputerPlayer)
                {
                    MatchComputerPlayer cp = (MatchComputerPlayer) mPlayers[0];
                    AIPlayer aip = cp.getAIPlayer();
                    if (!aip.isScriptedAI())
                    {
                        EAIConfigurationData eaiConfig = aip.getEAIConfig();
                        if (eaiConfig != null)
                        {
                            String wName = eaiConfig.getActiveWeightingCollection();
                            weightingUsed = Weighting.buildWeighting(wName);
                        }
                    }
                }
            }
            else // if(mPlayerTurn == 1)
            {
                if (mPlayers[1] instanceof MatchComputerPlayer)
                {
                    MatchComputerPlayer cp = (MatchComputerPlayer) mPlayers[1];
                    AIPlayer aip = cp.getAIPlayer();
                    if (!aip.isScriptedAI())
                    {
                        EAIConfigurationData eaiConfig = aip.getEAIConfig();
                        if (eaiConfig != null)
                        {
                            String wName = eaiConfig.getActiveWeightingCollection();
                            weightingUsed = Weighting.buildWeighting(wName);
                        }
                    }
                }
            }

           
           
           
            mResults.p0 = weightingUsed.getScoreArrayString(0);
            mResults.p1 = weightingUsed.getScoreArrayString(1);
            mDisplay[0].setGameOver(loser);
            mDisplay[1].setGameOver(loser);

            if (mOptions.isQuestMode())
            {
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

                }
            }
            mCurrentPhase = PHASES[PHASE_BEGINNING_UNTAP];


            Weighting weightingUsed = Weighting.DEFAULT;
            if (mPlayerTurn == 0)
            {
                if (mPlayers[0] instanceof MatchComputerPlayer)
                {
                    MatchComputerPlayer cp = (MatchComputerPlayer) mPlayers[0];
                    AIPlayer aip = cp.getAIPlayer();
                    if (!aip.isScriptedAI())
                    {
                        EAIConfigurationData eaiConfig = aip.getEAIConfig();
                        if (eaiConfig != null)
                        {
                            String wName = eaiConfig.getActiveWeightingCollection();
                            weightingUsed = Weighting.buildWeighting(wName);
                        }
                    }
                }
            }
            else // if(mPlayerTurn == 1)
            {
                if (mPlayers[1] instanceof MatchComputerPlayer)
                {
                    MatchComputerPlayer cp = (MatchComputerPlayer) mPlayers[1];
                    AIPlayer aip = cp.getAIPlayer();
                    if (!aip.isScriptedAI())
                    {
                        EAIConfigurationData eaiConfig = aip.getEAIConfig();
                        if (eaiConfig != null)
                        {
                            String wName = eaiConfig.getActiveWeightingCollection();
                            weightingUsed = Weighting.buildWeighting(wName);
                        }
                    }
                }
            }


            weightingUsed.buildScore(this, mPlayerTurn, true);
            weightingUsed.buildScore(this, mPlayerNotTurn, true);

            if (!isInTestMode()) if (Configuration.getConfiguration().isShowScoreAndPauseEachRound())
            {
                setPause(true);
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

                    mNextLeaf = (EAIPlanTree) ((DefaultMutableTreeNode)node.getFirstChild()).getUserObject();
            }

            int mPlayerTurn = mMatch.getPlayerTurn();
            Weighting.resetAllWeightings();
            Weighting weightingUsed = Weighting.DEFAULT;

            if (mPlayer instanceof MatchComputerPlayer)
            {
                MatchComputerPlayer cp = (MatchComputerPlayer) mPlayer;
                AIPlayer aip = cp.getAIPlayer();
View Full Code Here

Examples of csa.jportal.ai.enhancedAI.weighting.Weighting

        Set entries = allWeightings.entrySet();
        Iterator it = entries.iterator();
        while (it.hasNext())
        {
            Map.Entry entry = (Map.Entry) it.next();
            Weighting value = (Weighting) entry.getValue();
            jComboBoxScoringCollectionActive.addItem(value.getName());
        }


        mClassSetting--;
    }
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.