public static Ceil Create(Color background) { var ceil = new Ceil(); ceil.BorderBrush = new SolidColorBrush(Colors.White); ceil.BorderThickness = new Thickness(PlayGrid.ThicknessBetweenWidth); ceil.Child = new StackPanel { Width = PlayGrid.CeilSize, Height = PlayGrid.CeilSize, Background = new SolidColorBrush(background) }; return(ceil); }
public Ceil Clone() { var ceil = new Ceil(); var stackPanel = (StackPanel)Child; ceil.Column = Column; ceil.Row = Row; ceil.BorderBrush = BorderBrush.Clone(); ceil.BorderThickness = BorderThickness; ceil.Child = new StackPanel { Width = stackPanel.Width, Height = stackPanel.Height, Background = stackPanel.Background.Clone() }; return(ceil); }
public bool IsInNextColumn(Ceil ceil) { return(ceil.Column == Column + 1); }
public bool IsInSameColumn(Ceil ceil) { return(ceil.Column == Column); }
public bool IsInPrevColumn(Ceil ceil) { return(ceil.Column == Column - 1); }
public bool IsOnNextRow(Ceil ceil) { return(ceil.Row == Row + 1); }
public bool IsOnSameRow(Ceil ceil) { return(ceil.Row == Row); }
public bool IsOnPrevRow(Ceil ceil) { return(ceil.Row == Row - 1); }