//Clone a Copy. public void Clone(ref DrawCastleQ 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]; } } //Initiate a Constructed Brideges an Clone a Copy. AA = new DrawCastleQ(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.CastleMovments; i++) { AA.CastleThinkingQuantum[i] = new ThinkingQuantumChess(i, 4, CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column); this.CastleThinkingQuantum[i].Clone(ref AA.CastleThinkingQuantum[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--; }
//Clone a Copy. public void Clone(ref DrawCastleQ 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]; } } //Initiate a Constructed Brideges an Clone a Copy. AA = new DrawCastleQ(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.CastleMovments; i++) { AA.CastleThinkingQuantum[i] = new ThinkingQuantumChess(i, 4, CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column); this.CastleThinkingQuantum[i].Clone(ref AA.CastleThinkingQuantum[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; }