using System; namespace ConsoleApp2 { class Program { static void Main(string[] args) { Random rnd = new Random(); int width = 100, height = 40; string[,] Zeile = new string[height,width]; bool breakoff = false; Console.ForegroundColor = ConsoleColor.Green; do { for (int row = 0; row < height; row++) { for (int chargen = 0; chargen < width; chargen++) { string character = Convert.ToString(rnd.Next(3)); if (character == "0") { Zeile[row,chargen] = "0"; } else if (character == "1") { Zeile[row,chargen] = "1"; } else if (character == "2") { Zeile[row,chargen] = " "; } } } int rowLength = Zeile.GetLength(0); int colLength = Zeile.GetLength(1); string output = ""; for (int i = 0; i < rowLength; i++) { if (i > 0) { output += "\n"; } for (int j = 0; j < colLength; j++) { output += string.Format("{0}", Zeile[i, j]); } } Console.WriteLine(output); Console.Write(Environment.NewLine + Environment.NewLine); if (Console.KeyAvailable) if (Console.ReadKey().KeyChar == 'Q') break; System.Threading.Thread.Sleep(400); Console.Clear(); } while (breakoff == false); Console.ReadLine(); } } }