Пример #1
0
        private FallingColumn GenerateFallingColumn()
        {
            var column = new FallingColumn(_numberOfBlockTypes)
            {
                ColumnNumber = NumberOfColumns / 2,
                RowNumber    = MaxRows
            };

            return(column);
        }
Пример #2
0
 public FallingColumn NextColumn()
 {
     _currentColumn = NextColumnDisplay;
     if (_columns[_currentColumn.ColumnNumber].Boxes.Count >= MaxRows)
     {
         GameOver = true;
     }
     NextColumnDisplay = GenerateFallingColumn();
     return(_currentColumn);
 }
Пример #3
0
 public ColumnItemsControl(FallingColumn column, double width, double height) : base()
 {
     InitializeComponent();
     Column          = column;
     BoxWidth        = width;
     BoxHeight       = height - 2;
     CurrentProgress = 0;
     ColumnHeight    = height * Column.Boxes.Length;
     DataContext     = this;
 }