using System; using System.Collections.Generic; class HelloWorld { static char[,] plansza = new char[11,15] {{'.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, {'.','1','1','1','1','1','1','1','1','1','.','.','.','.','.'}, {'.','1','.','.','.','.','.','.','.','1','.','.','.','.','.'}, {'.','1','.','.','.','.','.','.','.','1','.','.','.','.','.'}, {'.','1','.','.','.','.','.','.','.','1','.','.','.','.','.'}, {'.','1','.','.','.','.','.','.','.','1','.','.','.','.','.'}, {'.','1','.','.','.','.','.','.','.','1','.','.','.','.','.'}, {'.','.','1','1','1','1','1','1','1','.','.','.','.','.','.'}, {'.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, {'.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, {'.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}}; static (int,int)[] modyfikatory = new (int,int)[] {(0,-1), (0,1), (-1,0), (1,0)}; static void _maluj(int _x, int _y, char k, char p) { var points = new Queue>(); points.Enqueue(Tuple.Create(_x,_y)); while (points.Count > 0) { var point = points.Dequeue(); var x = point.Item1; var y = point.Item2; plansza[y,x] = k; foreach (var mod in modyfikatory) { var rows = plansza.GetLength(0); var cols = plansza.GetLength(1); var yMod = mod.Item1; var xMod = mod.Item2; if (x+xMod >= 0 && x+xMod=0 && y+yMod