/// <summary> /// Проверяет имеется ли передаваемый тип элемента в соответствующих координатах. /// </summary> public bool HasElementAt(BoardPoint point, BoardElement element) { if (point.IsOutOfBoard(Size)) { return(false); } return(GetElementAt(point) == element); }
public BoardElement GetElementAtOrWall(BoardPoint point) { if (point.IsOutOfBoard(Size)) { return(BoardElement.Wall); } return((BoardElement)BoardString[GetShiftByPoint(point)]); }
public bool IsBarrierAt(BoardPoint point) { return(GetBarriers().Contains(point)); }
private int GetShiftByPoint(BoardPoint point) { return(point.Y * Size + point.X); }
public bool HasElementAt(BoardPoint point, params BoardElement[] elements) { return(elements.Any(e => HasElementAt(point, e))); }
public BoardElement GetElementAt(BoardPoint point) { return((BoardElement)BoardString[GetShiftByPoint(point)]); }
public bool IsBadThingAt(BoardPoint point) { return(GetBadThings().Contains(point)); }