コード例 #1
0
ファイル: DrawKing.cs プロジェクト: tetrashop/Refrigitz
 //Clone a Copy.
 public void Clone(ref DrawKing 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 Construction Object and Clone a Copy.
     AA = new DrawKing(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.KingMovments; i++)
     {
         AA.KingThinking[i] = new ThinkingChess(i, 6, CurrentAStarGredyMax, MovementsAStarGreedyHeuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHeuristicT, OnlySelfT, AStarGreedyHeuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column);
         this.KingThinking[i].Clone(ref AA.KingThinking[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;
 }
コード例 #2
0
ファイル: DrawKing.cs プロジェクト: radtek/Refrigitz
 //Clone a Copy.
 public void Clone(ref DrawKing 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 Construction Object and Clone a Copy.
     AA = new DrawKing(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.KingMovments; i++)
     {
         AA.KingThinking[i] = new ThinkingChess(i, 6, CurrentAStarGredyMax, MovementsAStarGreedyHuristicFoundT, IgnoreSelfObjectsT, UsePenaltyRegardMechnisamT, BestMovmentsT, PredictHuristicT, OnlySelfT, AStarGreedyHuristicT, ArrangmentsChanged, (int)this.Row, (int)this.Column);
         this.KingThinking[i].Clone(ref AA.KingThinking[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--;
 }