/// <summary> /// Returns the value of possible next move. /// Next position should be set inside chromosome. /// </summary> private double CalculateNextMove(TicTacToeChromosome chromosome) { double positionValue = 0; double[][] board = chromosome.Board; // In game board Point randomEmptySpace = this.CalculateNextEmptySpace(board); // Connect empty space with chromosome this.SetEmptySpaceForChromosome(chromosome, randomEmptySpace); // Valculate value for specified position positionValue = this.CalculatePositionValue(board, randomEmptySpace); return(positionValue); }
private void SetEmptySpaceForChromosome(TicTacToeChromosome chromosome, Point point) { chromosome.Position.X = point.X; chromosome.Position.Y = point.Y; }