You create your gear array incorrectly!
char[][] board = Enumerable.Repeat(Enumerable.Repeat('-', 7).ToArray(), 7).ToArray();
Enumerable.Repeat
will create a sequence containing one repeated value. So you create a char [] [] in which each array will point to the same link. In this case, when you change one of the arrays, you change them all.
You need to create an array with a notch, and the array [5] [2] will only change the 5th array:
char[][] array = Enumerable.Range(0, 7).Select(i => Enumerable.Repeat('-', 7).ToArray()).ToArray(); array[5][2] = '*';
source share