Esempio n. 1
0
 public void Write(BlockBoard blockBoard)
 {
     foreach (var row in blockBoard.Rows.Reverse())
     {
         Console.WriteLine(row.Cells.Aggregate("", (x, y) => x + CellRepresentation(y)));
     }
 }
Esempio n. 2
0
 public void Write(BlockBoard blockBoard)
 {
     foreach(var row in blockBoard.Rows.Reverse())
     {
         Console.WriteLine(row.Cells.Aggregate("", (x, y) => x + CellRepresentation(y)));
     }
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }