public override List <Direction> ExcludedDirections()
        {
            var directionHelper = new DirectionHelper();

            return(directionHelper.GetAllDirections()
                   .Except(directionHelper.GetDiagonalDirections())
                   .ToList());
        }
示例#2
0
 public void ShouldReturnAllDirections()
 {
     helper.GetAllDirections()
     .ShouldContain()
     .Elements(
         Direction.N,
         Direction.NE,
         Direction.E,
         Direction.SE,
         Direction.S,
         Direction.SW,
         Direction.W,
         Direction.NW
         );
 }
        /* Highlighting of all possible moves
         */
        private void HighlightPossibleTurns(BaseChecker currentSelectedChecker)
        {
            PathPoint turns = currentSelectedChecker.GetPossibleTurns();

            if (!turns.IsDeadEnd())
            {
                foreach (TurnDirection direction in DirectionHelper.GetAllDirections())
                {
                    foreach (PathPoint point in turns[direction])
                    {
                        board[point.Position.X, point.Position.Y].Highlighted = true;
                    }
                }
            }
        }
示例#4
0
 public override List <Direction> ExcludedDirections()
 {
     return(directionHelper.GetAllDirections()
            .Except(directionHelper.GetOppositePair(direction))
            .ToList());
 }
示例#5
0
 public override List <Direction> ExcludedDirections()
 {
     return(directionHelper.GetAllDirections()
            .Except(turnListTo)
            .ToList());
 }