Example #1
0
        public virtual PentagoNode FindOptimalNode2(PentagoBoard board, int depth)
        {
            var clone = board.Clone() as PentagoBoard;
            var root  = new PentagoNode(clone, base.color, depth);

            root.Evaluate(this.color);
            return(root.BestChild);
        }
Example #2
0
 public PentagoNode(PentagoBoard currentState, PentagoNode parent)
     : base(parent.Depth + 1)
 {
     this.currentState = currentState;
     this.currentTurn  = parent.NextTurn();
     this.Parent       = parent;
     this.maxDepth     = parent.maxDepth;
     this.nodeType     = (parent.nodeType == NodeTypeEnum.MAX) ? NodeTypeEnum.MIN : NodeTypeEnum.MAX;
     //System.Diagnostics.Debug.WriteLine(Depth+" "+currentTurn.State);
 }