Help with a 2D array maze
Hi, I'm trying to create a maze that characters can run around in, I think that I've got the basics done but I need more specific help. My code:
publicclass maze{
/** Creates a new instance of maze */
publicvoid maze(String[] args){
int[][]maze =newint[][]{
{0,1,0,0,0,0,0,0,0},
{0,1,1,1,1,1,1,1,0},
{0,0,0,0,0,0,0,1,0},
{0,1,1,1,1,0,0,1,0},
{0,1,0,0,1,1,1,1,0},
{0,1,1,0,0,0,0,0,0},
{0,1,0,0,1,1,1,1,0},
{0,1,0,0,1,0,0,1,0},
{0,1,1,1,1,0,0,1,0},
{0,0,0,0,0,0,0,1,0}};
for (int i=0; i < maze.length; i++){
for (int j=0; j < maze[i].length; j++){
System.out.print(maze[i][j]);
}
System.out.println();
}
}
Well that's it, as you can see it really is just an array; what do I need to do to make it print out "*" instead of 0s and " " instead of 1s (0s are meant to be walls and 1s the passage way), and how should I go about doing it.
If anyone could help that would be great.
Thanks in advance.

