Exemplo n.º 1
0
 //Clone a Copy.
 public void Clone(ref DrawMinister 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 an Object and Clone a Construction Objectve.
     AA = new DrawMinister(CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, Row, Column, this.color, this.CloneATable(Table), this.Order, false, this.Current);
     AA.ArrangmentsChanged = ArrangmentsChanged;
     for (var i = 0; i < AllDraw.MinisterMovments; i++)
     {
         AA.MinisterThinking[i] = new ThinkingChess(i, 5, CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column);
         this.MinisterThinking[i].Clone(ref AA.MinisterThinking[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--;
 }
Exemplo n.º 2
0
 //Clone a Copy.
 public void Clone(ref DrawMinister 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 an Object and Clone a Construction Objectve.
     AA = new DrawMinister(CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, Row, Column, this.color, this.CloneATable(Table), this.Order, false, this.Current);
     AA.ArrangmentsChanged = ArrangmentsChanged;
     for (var i = 0; i < AllDraw.MinisterMovments; i++)
     {
         AA.MinisterThinking[i] = new ThinkingChess(i, 5, CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column);
         this.MinisterThinking[i].Clone(ref AA.MinisterThinking[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;
 }