public void MoveDown() { int limit = Globals.Cols; for (int i = CanvasSquareList.Count() - 1; i >= limit; --i) { CanvasSquareList[i].IsFilled = CanvasSquareList[i - Globals.Cols].IsFilled; } for (int i = limit - 1; i >= 0; --i) { CanvasSquareList[i].IsFilled = false; } }
public void MoveUp() { int limit = CanvasSquareList.Count() - Globals.Cols; for (int i = 0; i < limit; ++i) { CanvasSquareList[i].IsFilled = CanvasSquareList[i + Globals.Cols].IsFilled; } for (int i = limit; i < CanvasSquareList.Count(); ++i) { CanvasSquareList[i].IsFilled = false; } }