Example #1
0
        private IEnumerable <BoardPoint> EnumerateNeighbors(BoardPoint point)
        {
            yield return(point.ShiftLeft());

            yield return(point.ShiftRight());

            yield return(point.ShiftTop());

            yield return(point.ShiftBottom());
        }
Example #2
0
 private bool HasElementAt(BoardPoint point, params BoardElement[] elements)
 {
     return(elements.Any(elem => HasElementAt(point.X, point.Y, elem)));
 }