コード例 #1
0
 //private static MoveDirection GetOppositeDirection
 /// <summary>
 /// Compute moves with cills
 /// </summary>
 private static void ComputeMovesWithKill()
 {
     foreach (MoveDirection moveDir in  Enum.GetValues(typeof(MoveDirection)))
     {
         Checker killed;
         if (_checker.CheckKill(moveDir, out killed))
         {
             if (TryAddNode(killed, moveDir))
             {
                 var killeds = from node in _nodes
                               select node.Killed;
                 _checker.AddMove(moveDir, killeds.ToArray(), out _previousMove);
                 SetQueenIfNeeded();
                 CheckWillNeedSetQueenNextMoves();
                 foreach (Cell toCell in _checker.GetCellAfterKill(moveDir, killed))
                 {
                     _checker.Move(toCell);
                     ComputeMovesWithKill();
                 }
                 // to prev node
                 EndOfMultipleMove();
             }
         }
     }
 }