public static void MovementPrint(char[, ] arr, int velocity = 100, char symbol = '@', ConsoleColor color = ConsoleColor.DarkBlue)
        {
            char[, ] display = new char[arr.GetLength(0), (int)(arr.GetLength(1) * 1.5)];
            int           displayRows = display.GetLength(0);
            int           displayCols = display.GetLength(1);
            int           shift       = 0;
            int           cycle       = 0;
            StringBuilder strbResult  = null;

            while (true)
            {
                cycle = cycle > displayCols ? 0 : ++cycle;
                if (cycle == 0)
                {
                    shift = 0;
                }

                Console.Clear();

                display = MoveInfoOnDisplay(display);
                display = AddInfoToLastCol(display, arr, shift);
                shift++;

                strbResult = Symbols.ToOneLineArrayConvert(display);
                strbResult.Replace('#', symbol);

                Tools.WriteLineColorized($"{strbResult.ToString()}", color);

                Thread.Sleep(velocity);
            }
        }
Beispiel #2
0
        public static void MovementPrint(char[, ] arr, int velocity = 100, char symbol = '@', ConsoleColor color = ConsoleColor.DarkBlue)
        {
            StringBuilder strbResult = null;
            int           count      = 0;

            while (count < arr.GetLength(1))
            {
                Console.Clear();

                arr        = Symbols.MoveArray(arr);
                strbResult = Symbols.ToOneLineArrayConvert(arr);
                strbResult.Replace('#', symbol);

                Tools.WriteLineColorized($"{strbResult.ToString()}", color);

                Thread.Sleep(velocity);
                count++;
            }
        }