//Cloen a Copy. public void Clone(ref DrawHourse AA//, ref AllDraw. THIS ) { int[,] Tab = new int[8, 8]; for (var i = 0; i < 8; i++) { for (var j = 0; j < 8; j++) { Tab[i, j] = this.Table[i, j]; } } //Create a Construction Ojects and Initiate a Clone Copy. AA = new DrawHourse(CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, this.Row, this.Column, this.color, this.CloneATable(Table), this.Order, false, this.Current); AA.ArrangmentsChanged = ArrangmentsChanged; for (var i = 0; i < AllDraw.HourseMovments; i++) { AA.HourseThinking[i] = new ThinkingChess(i, 3, CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column); this.HourseThinking[i].Clone(ref AA.HourseThinking[i]); } AA.Table = new int[8, 8]; for (var ii = 0; ii < 8; ii++) { for (var jj = 0; jj < 8; jj++) { AA.Table[ii, jj] = Tab[ii, jj]; } } AA.Row = Row; AA.Column = Column; AA.Order = Order; AA.Current = Current; AA.color = color; }
//Cloen a Copy. public void Clone(ref DrawHourse AA//, ref AllDraw. THIS ) { //long Time = TimeElapced.TimeNow();Spaces++; int[,] Tab = new int[8, 8]; for (var i = 0; i < 8; i++) { for (var j = 0; j < 8; j++) { Tab[i, j] = this.Table[i, j]; } } //Create a Construction Ojects and Initiate a Clone Copy. AA = new DrawHourse(CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, this.Row, this.Column, this.color, this.CloneATable(Table), this.Order, false, this.Current); AA.ArrangmentsChanged = ArrangmentsChanged; for (var i = 0; i < AllDraw.HourseMovments; i++) { AA.HourseThinking[i] = new ThinkingChess(i, 3, CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column); this.HourseThinking[i].Clone(ref AA.HourseThinking[i]); } AA.Table = new int[8, 8]; for (var ii = 0; ii < 8; ii++) { for (var jj = 0; jj < 8; jj++) { AA.Table[ii, jj] = Tab[ii, jj]; } } AA.Row = Row; AA.Column = Column; AA.Order = Order; AA.Current = Current; AA.color = color; ////{ AllDraw.OutPut.Append("\r\n");for (int l = 0; l < Spaces; l++) AllDraw.OutPut.Append(Space); AllDraw.OutPut.Append("Clone:" + (TimeElapced.TimeNow() - Time).ToString());}Spaces--; }