예제 #1
0
        private List <float> GetHardWeights(AIBoard board)
        {
            float p1spWeight = 1f;
            float p2spWeight = 1f;

            //Variables used in weight calculations.
            int playerOneSP            = BoardAnalysis.FindShortestPath(board, true);
            int playerTwoSP            = BoardAnalysis.FindShortestPath(board, true);
            int playerTwoNumWalls      = CurrentBoard.GetPlayerTwoNumWalls();
            int distanceBetweenPlayers = BoardAnalysis.FindDistanceBetween(CurrentBoard, CurrentBoard.GetPlayerOnePos(), CurrentBoard.GetPlayerTwoPos());

            if (playerOneSP - playerTwoSP > 2)
            {
                p1spWeight = 5;
            }
            else if (playerOneSP < 5)
            {
                p1spWeight = 2;
            }


            List <float> w = new List <float> {
                p1spWeight, p2spWeight
            };

            return(w);
        }