BalloonsPop.ConsoleUI.ConsoleUI.PrintField C# (CSharp) Method

PrintField() public method

public PrintField ( IBalloon matrix ) : void
matrix IBalloon
return void
        public void PrintField(IBalloon[,] matrix)
        {
            Console.Clear();
            this.PrintColumnIndeces();

            this.PrintDashedLine(1 + (matrix.GetLength(1) * 2));

            for (byte i = 0; i < matrix.GetLongLength(0); i++)
            {
                this.PrintRowBeggining(i);

                for (byte j = 0; j < matrix.GetLongLength(1); j++)
                {
                    this.PrintBalloon(matrix[i, j]);
                }

                this.SetConsoleColorToDefault();
                this.PrintRowEnd();
            }

            this.PrintDashedLine(1 + (matrix.GetLength(1) * 2));
        }