Esempio n. 1
0
        public string GetBestPosition()
        {
            var boardWalker = new BoardWalker(board, visitedPoints);

            BoardUtils.SetBoard(board);
            var   possiblePositions = BoardUtils.GetPossiblePosition();
            var   maxScores         = 0;
            Point bestPosition      = null;

            possiblePositions.ForEach(possiblePosition =>
            {
                var currentPossiblePosition = boardWalker.CountScores(possiblePosition);
                if (currentPossiblePosition.Scores > maxScores)
                {
                    maxScores    = currentPossiblePosition.Scores;
                    bestPosition = currentPossiblePosition;
                }
            });

            return($"{NumberToString(bestPosition.Y + 1, true)}{bestPosition.X + 1}");;
        }