public void Write(BlockBoard blockBoard) { foreach (var row in blockBoard.Rows.Reverse()) { Console.WriteLine(row.Cells.Aggregate("", (x, y) => x + CellRepresentation(y))); } }
public void Write(BlockBoard blockBoard) { foreach(var row in blockBoard.Rows.Reverse()) { Console.WriteLine(row.Cells.Aggregate("", (x, y) => x + CellRepresentation(y))); } }
static void Main(string[] args) { var blockBoard = new BlockBoard(); blockBoard.AddBlock(1, 1); var consoleWriter = new ConsoleWriter(); consoleWriter.Write(blockBoard); blockBoard.ApplyGravity(); consoleWriter.Write(blockBoard); }