I am trying to setup a 2d array in C# to act as a maze to move a character around, I am having a few issues initialising the array, I am trying to do the below
but t
You can't initialize an array like that other than in a variable declaration. However, the change is simple:
maze = new int[,] {
// As before
};
As asides:
maze
should be an instance variable rather than a static variable. After all, you're initializing it each time you create an instance of Maze